all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: rms@gnu.org
Cc: emacs-devel@gnu.org
Subject: Subject: mb-depth.el (was: Minibuffer default values list)
Date: Sun, 25 Nov 2007 17:19:52 +0200	[thread overview]
Message-ID: <87prxyfkzn.fsf_-_@jurta.org> (raw)
In-Reply-To: <E1Iw8On-0000XS-VR@fencepost.gnu.org> (Richard Stallman's message of "Sat, 24 Nov 2007 22:43:13 -0500")

BTW, currently mb-depth.el uses 3 different name prefixes for its
variables and functions:

minibuffer-indicate-depth
minibuffer-depth
minibuf-depth

To reduce the entropy, I propose to use the same name prefix
`minibuffer-depth' that is the name of the primary function
this package relies on:

Index: lisp/mb-depth.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/mb-depth.el,v
retrieving revision 1.4
diff -u -r1.4 mb-depth.el
--- lisp/mb-depth.el	8 Oct 2007 14:44:49 -0000	1.4
+++ lisp/mb-depth.el	25 Nov 2007 15:19:45 -0000
@@ -24,7 +24,7 @@
 
 ;;; Commentary:
 ;;
-;; Defines the minor mode `minibuffer-indicate-depth-mode'.
+;; Defines the minor mode `minibuffer-depth-indicate-mode'.
 ;;
 ;; When active, any recursive use of the minibuffer will show
 ;; the recursion depth in the minibuffer prompt.  This is only
@@ -32,7 +32,7 @@
 
 ;;; Code:
 
-(defvar minibuf-depth-indicator-function nil
+(defvar minibuffer-depth-indicator-function nil
   "If non-nil, function to set up the minibuffer depth indicator.
 It is called with one argument, the minibuffer depth,
 and must return a string.")
@@ -40,24 +40,24 @@
 ;; An overlay covering the prompt.  This is a buffer-local variable in
 ;; each affected minibuffer.
 ;;
-(defvar minibuf-depth-overlay)
-(make-variable-buffer-local 'minibuf-depth-overlay)
+(defvar minibuffer-depth-overlay)
+(make-variable-buffer-local 'minibuffer-depth-overlay)
 
 ;; This function goes on minibuffer-setup-hook
-(defun minibuf-depth-setup-minibuffer ()
-  "Set up a minibuffer for `minibuffer-indicate-depth-mode'.
+(defun minibuffer-depth-setup ()
+  "Set up a minibuffer for `minibuffer-depth-indicate-mode'.
 The prompt should already have been inserted."
   (when (> (minibuffer-depth) 1)
-    (setq minibuf-depth-overlay (make-overlay (point-min) (1+ (point-min))))
-    (overlay-put minibuf-depth-overlay 'before-string
-		 (if minibuf-depth-indicator-function
-		     (funcall minibuf-depth-indicator-function (minibuffer-depth))
+    (setq minibuffer-depth-overlay (make-overlay (point-min) (1+ (point-min))))
+    (overlay-put minibuffer-depth-overlay 'before-string
+		 (if minibuffer-depth-indicator-function
+		     (funcall minibuffer-depth-indicator-function (minibuffer-depth))
 		   (propertize (format "[%d]" (minibuffer-depth)) 'face 'highlight)))
-    (overlay-put minibuf-depth-overlay 'evaporate t)))
+    (overlay-put minibuffer-depth-overlay 'evaporate t)))
 
 ;;;###autoload
-(define-minor-mode minibuffer-indicate-depth-mode
-  "Toggle Minibuffer Indicate Depth mode.
+(define-minor-mode minibuffer-depth-indicate-mode
+  "Toggle Minibuffer Depth Indication mode.
 When active, any recursive use of the minibuffer will show
 the recursion depth in the minibuffer prompt.  This is only
 useful if `enable-recursive-minibuffers' is non-nil.
@@ -66,11 +66,11 @@
 Returns non-nil if the new state is enabled."
   :global t
   :group 'minibuffer
-  (if minibuffer-indicate-depth-mode
+  (if minibuffer-depth-indicate-mode
       ;; Enable the mode
-      (add-hook 'minibuffer-setup-hook 'minibuf-depth-setup-minibuffer)
+      (add-hook 'minibuffer-setup-hook 'minibuffer-depth-setup)
     ;; Disable the mode
-    (remove-hook 'minibuffer-setup-hook 'minibuf-depth-setup-minibuffer)))
+    (remove-hook 'minibuffer-setup-hook 'minibuffer-depth-setup)))
 
 (provide 'mb-depth)

-- 
Juri Linkov
http://www.jurta.org/emacs/

  parent reply	other threads:[~2007-11-25 15:19 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-22  0:22 Minibuffer default values list Juri Linkov
2007-10-23  7:12 ` Richard Stallman
2007-10-28 10:57   ` Juri Linkov
2007-11-11 23:42     ` Juri Linkov
2007-11-12  5:59       ` Richard Stallman
2007-11-16  1:27         ` Substitute ? in dired without surrounding whitespace (was: Minibuffer default values list) Juri Linkov
2007-11-17 23:30           ` Richard Stallman
2007-11-17 23:57             ` Substitute ? in dired without surrounding whitespace Juri Linkov
2007-11-18 22:46               ` Richard Stallman
2007-11-19  0:48         ` Minibuffer default values list Juri Linkov
2007-11-22  2:28           ` Richard Stallman
2007-11-22 19:02             ` Juri Linkov
2007-11-23  4:35               ` Richard Stallman
2007-11-24 17:54                 ` Juri Linkov
2007-11-25  3:43                   ` Richard Stallman
2007-11-25 15:18                     ` mb-pos.el (was: Minibuffer default values list) Juri Linkov
2007-12-02 21:27                       ` Richard Stallman
2007-12-03  0:34                         ` Minibuffer default values list Juri Linkov
2007-12-03 18:43                           ` Richard Stallman
2007-11-25 15:19                     ` Juri Linkov [this message]
2008-07-31 17:28                       ` mb-depth.el (was: Minibuffer default values list) Juri Linkov
2008-07-31 18:08                         ` Drew Adams
2008-07-31 18:24                           ` Juanma Barranquero
2008-07-31 18:35                             ` Drew Adams
2008-08-01 12:34                               ` Juanma Barranquero
2008-08-01 16:27                                 ` Drew Adams
2008-08-01 17:09                                   ` mb-depth.el patch Drew Adams
2008-08-04 13:13                                     ` Juanma Barranquero
2007-11-23  4:35               ` Minibuffer default values list Richard Stallman
2007-11-23 15:05                 ` Stefan Monnier
     [not found]                   ` <E1IvwoM-0004oD-AU@fencepost.gnu.org>
     [not found]                     ` <jwvwss5ptqv.fsf-monnier+emacs@gnu.org>
2007-12-03 18:42                       ` Richard Stallman
2007-11-19  0:52         ` Juri Linkov
2007-11-19 19:02           ` Richard Stallman
2007-11-23  0:48             ` Juri Linkov
2007-11-11 23:43 ` Juri Linkov
2007-11-12  5:59   ` Richard Stallman
2007-11-11 23:45 ` Juri Linkov
2007-11-12  5:59   ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87prxyfkzn.fsf_-_@jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.