diff options
author | Gabriel do Nascimento Ribeiro <gabriel376@hotmail.com> | 2021-01-06 20:27:26 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2021-01-06 20:27:26 +0200 |
commit | 7936c8a96060fa118220d4d874f740dc75e2fe47 (patch) | |
tree | 98451e889f7602ad8833674b00efe98b9d967d2f /lisp/mb-depth.el | |
parent | 96bbbaec5c1b2612946ff08abf9d43e7478e8c43 (diff) | |
download | emacs-7936c8a96060fa118220d4d874f740dc75e2fe47.tar.gz |
* 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
Diffstat (limited to 'lisp/mb-depth.el')
-rw-r--r-- | lisp/mb-depth.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/mb-depth.el b/lisp/mb-depth.el index 06da0739d6b..ea2ea174b50 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 |