diff lisp/mb-depth.el @ 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 baed8c5b63a7
children b9e8ab94c460
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