changeset 85085:20e6cbaf918a

(minibuf-depth-indicator-function): New variable. (minibuf-depth-setup-minibuffer): Use it.
author Juanma Barranquero <lekktu@gmail.com>
date Mon, 08 Oct 2007 14:44:49 +0000
parents ccf63a47cd32
children 475e4a800591
files lisp/mb-depth.el
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mb-depth.el	Sun Oct 07 07:18:10 2007 +0000
+++ b/lisp/mb-depth.el	Mon Oct 08 14:44:49 2007 +0000
@@ -32,6 +32,11 @@
 
 ;;; Code:
 
+(defvar minibuf-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.")
+
 ;; An overlay covering the prompt.  This is a buffer-local variable in
 ;; each affected minibuffer.
 ;;
@@ -45,8 +50,9 @@
   (when (> (minibuffer-depth) 1)
     (setq minibuf-depth-overlay (make-overlay (point-min) (1+ (point-min))))
     (overlay-put minibuf-depth-overlay 'before-string
-		 (propertize (format "[%d]" (minibuffer-depth))
-			     'face 'highlight))
+		 (if minibuf-depth-indicator-function
+		     (funcall minibuf-depth-indicator-function (minibuffer-depth))
+		   (propertize (format "[%d]" (minibuffer-depth)) 'face 'highlight)))
     (overlay-put minibuf-depth-overlay 'evaporate t)))
 
 ;;;###autoload