]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/mb-depth.el (minibuffer-depth-indicator): New face.
authorGabriel do Nascimento Ribeiro <gabriel376@hotmail.com>
Wed, 6 Jan 2021 18:27:26 +0000 (20:27 +0200)
committerJuri Linkov <juri@linkov.net>
Wed, 6 Jan 2021 18:27:26 +0000 (20:27 +0200)
(minibuffer-depth-setup): Use new face and add a single space between
the depth indicator and the minibuffer prompt.
https://lists.gnu.org/archive/html/emacs-devel/2020-12/msg00230.html

Copyright-paperwork-exempt: yes

lisp/mb-depth.el

index 06da0739d6b8858631bb4ffb82b55a055cd2b7e6..ea2ea174b50a0ad8bacd20550e4bfd1fc3aa0967 100644 (file)
 It is called with one argument, the minibuffer depth,
 and must return a string.")
 
+(defface minibuffer-depth-indicator '((t :inherit highlight))
+  "Face to use for minibuffer depth indicator."
+  :version "28.1")
+
 ;; An overlay covering the prompt.  This is a buffer-local variable in
 ;; each affected minibuffer.
 ;;
@@ -52,7 +56,10 @@ The prompt should already have been inserted."
       (overlay-put minibuffer-depth-overlay 'before-string
                    (if minibuffer-depth-indicator-function
                        (funcall minibuffer-depth-indicator-function depth)
-                     (propertize (format "[%d]" depth) 'face 'highlight)))
+                     (concat (propertize (format "[%d]" depth)
+                                         'face
+                                         'minibuffer-depth-indicator)
+                             " ")))
       (overlay-put minibuffer-depth-overlay 'evaporate t))))
 
 ;;;###autoload