emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 7936c8a: * lisp/mb-depth.el (minibuffer-depth-indicator): New fac


From: Juri Linkov
Subject: master 7936c8a: * lisp/mb-depth.el (minibuffer-depth-indicator): New face.
Date: Wed, 6 Jan 2021 13:27:58 -0500 (EST)

branch: master
commit 7936c8a96060fa118220d4d874f740dc75e2fe47
Author: Gabriel do Nascimento Ribeiro <gabriel376@hotmail.com>
Commit: Juri Linkov <juri@linkov.net>

    * lisp/mb-depth.el (minibuffer-depth-indicator): New face.
    
    (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 | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lisp/mb-depth.el b/lisp/mb-depth.el
index 06da073..ea2ea17 100644
--- a/lisp/mb-depth.el
+++ b/lisp/mb-depth.el
@@ -35,6 +35,10 @@
 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]