1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

* 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
This commit is contained in:
Gabriel do Nascimento Ribeiro 2021-01-06 20:27:26 +02:00 committed by Juri Linkov
parent 96bbbaec5c
commit 7936c8a960

View file

@ -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