diff options
| author | Gabriel do Nascimento Ribeiro | 2021-01-06 20:27:26 +0200 |
|---|---|---|
| committer | Juri Linkov | 2021-01-06 20:27:26 +0200 |
| commit | 7936c8a96060fa118220d4d874f740dc75e2fe47 (patch) | |
| tree | 98451e889f7602ad8833674b00efe98b9d967d2f | |
| parent | 96bbbaec5c1b2612946ff08abf9d43e7478e8c43 (diff) | |
| download | emacs-7936c8a96060fa118220d4d874f740dc75e2fe47.tar.gz emacs-7936c8a96060fa118220d4d874f740dc75e2fe47.zip | |
* 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
| -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 @@ | |||
| 35 | It is called with one argument, the minibuffer depth, | 35 | It is called with one argument, the minibuffer depth, |
| 36 | and must return a string.") | 36 | and must return a string.") |
| 37 | 37 | ||
| 38 | (defface minibuffer-depth-indicator '((t :inherit highlight)) | ||
| 39 | "Face to use for minibuffer depth indicator." | ||
| 40 | :version "28.1") | ||
| 41 | |||
| 38 | ;; An overlay covering the prompt. This is a buffer-local variable in | 42 | ;; An overlay covering the prompt. This is a buffer-local variable in |
| 39 | ;; each affected minibuffer. | 43 | ;; each affected minibuffer. |
| 40 | ;; | 44 | ;; |
| @@ -52,7 +56,10 @@ The prompt should already have been inserted." | |||
| 52 | (overlay-put minibuffer-depth-overlay 'before-string | 56 | (overlay-put minibuffer-depth-overlay 'before-string |
| 53 | (if minibuffer-depth-indicator-function | 57 | (if minibuffer-depth-indicator-function |
| 54 | (funcall minibuffer-depth-indicator-function depth) | 58 | (funcall minibuffer-depth-indicator-function depth) |
| 55 | (propertize (format "[%d]" depth) 'face 'highlight))) | 59 | (concat (propertize (format "[%d]" depth) |
| 60 | 'face | ||
| 61 | 'minibuffer-depth-indicator) | ||
| 62 | " "))) | ||
| 56 | (overlay-put minibuffer-depth-overlay 'evaporate t)))) | 63 | (overlay-put minibuffer-depth-overlay 'evaporate t)))) |
| 57 | 64 | ||
| 58 | ;;;###autoload | 65 | ;;;###autoload |