;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;;; 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.
;;
(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