emacs: make the modeline narrow indicator check only major mode, not derivatives

This commit is contained in:
Protesilaos 2026-06-21 14:59:17 +03:00
parent 5112e1a074
commit 805ab6c121
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA
2 changed files with 2 additions and 2 deletions

View file

@ -14326,7 +14326,7 @@ Specific to the current window's mode line.")
'(:eval
(when (and (mode-line-window-selected-p)
(buffer-narrowed-p)
(not (derived-mode-p 'Info-mode 'help-mode 'special-mode 'message-mode)))
(not (memq major-mode '(Info-mode help-mode message-mode special-mode))))
(propertize " Narrow " 'face 'prot-modeline-indicator-cyan-bg)))
"Mode line construct to report the narrowed state of the current buffer.")

View file

@ -275,7 +275,7 @@ Specific to the current window's mode line.")
'(:eval
(when (and (mode-line-window-selected-p)
(buffer-narrowed-p)
(not (derived-mode-p 'Info-mode 'help-mode 'special-mode 'message-mode)))
(not (memq major-mode '(Info-mode help-mode message-mode special-mode))))
(propertize " Narrow " 'face 'prot-modeline-indicator-cyan-bg)))
"Mode line construct to report the narrowed state of the current buffer.")