mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
mode-line-modes-delimiters: New option
This commit is contained in:
parent
a4bff57551
commit
7bb648eb80
2 changed files with 16 additions and 2 deletions
5
etc/NEWS
5
etc/NEWS
|
|
@ -336,6 +336,11 @@ single button. The value could also be a list to specify minor mode
|
||||||
lighters to hide or show. The default value is nil, which retains the
|
lighters to hide or show. The default value is nil, which retains the
|
||||||
previous behavior of showing all minor mode lighters.
|
previous behavior of showing all minor mode lighters.
|
||||||
|
|
||||||
|
*** New user option 'mode-line-modes-delimiters'.
|
||||||
|
This option allows changing or removing the delimiters shown around
|
||||||
|
the major mode and list of minor modes in the mode line. The default
|
||||||
|
retains the existing behavior of inserting parentheses.
|
||||||
|
|
||||||
** Tab Bars and Tab Lines
|
** Tab Bars and Tab Lines
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -445,6 +445,15 @@ lighters hidden."
|
||||||
:group 'mode-line
|
:group 'mode-line
|
||||||
:version "31.1")
|
:version "31.1")
|
||||||
|
|
||||||
|
(defcustom mode-line-modes-delimiters '("(" . ")")
|
||||||
|
"Strings placed around the modes displayed in the mode line.
|
||||||
|
These elements are placed around `mode-name' and `mode-line-modes'."
|
||||||
|
:type '(choice (const :tag "No delimiters")
|
||||||
|
(cons (string :tag "Left delimiter")
|
||||||
|
(string :tag "Right delimiter")))
|
||||||
|
:group 'mode-line
|
||||||
|
:version "31.1")
|
||||||
|
|
||||||
(defvar mode-line-minor-modes '(:eval (mode-line--minor-modes))
|
(defvar mode-line-minor-modes '(:eval (mode-line--minor-modes))
|
||||||
"Mode line construct for minor mode lighters.")
|
"Mode line construct for minor mode lighters.")
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
|
@ -577,7 +586,7 @@ Keymap to display on minor modes.")
|
||||||
(let ((recursive-edit-help-echo
|
(let ((recursive-edit-help-echo
|
||||||
"Recursive edit, type C-M-c to get out"))
|
"Recursive edit, type C-M-c to get out"))
|
||||||
(list (propertize "%[" 'help-echo recursive-edit-help-echo)
|
(list (propertize "%[" 'help-echo recursive-edit-help-echo)
|
||||||
"("
|
'(:eval (car mode-line-modes-delimiters))
|
||||||
`(:propertize ("" mode-name)
|
`(:propertize ("" mode-name)
|
||||||
help-echo "Major mode\n\
|
help-echo "Major mode\n\
|
||||||
mouse-1: Display major mode menu\n\
|
mouse-1: Display major mode menu\n\
|
||||||
|
|
@ -591,7 +600,7 @@ mouse-3: Toggle minor modes"
|
||||||
'local-map (make-mode-line-mouse-map
|
'local-map (make-mode-line-mouse-map
|
||||||
'mouse-2 #'mode-line-widen))
|
'mouse-2 #'mode-line-widen))
|
||||||
'("" mode-line-minor-modes)
|
'("" mode-line-minor-modes)
|
||||||
")"
|
'(:eval (cdr mode-line-modes-delimiters))
|
||||||
(propertize "%]" 'help-echo recursive-edit-help-echo)
|
(propertize "%]" 'help-echo recursive-edit-help-echo)
|
||||||
" "))
|
" "))
|
||||||
"Mode line construct for displaying major and minor modes.")
|
"Mode line construct for displaying major and minor modes.")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue