summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
authorMichael Hendricks <michael@ndrix.org>2018-05-05 12:41:43 +0300
committerEli Zaretskii <eliz@gnu.org>2018-05-05 12:41:43 +0300
commit8f2a81510548d9ccce691c908eb9ca13414ea45c (patch)
treecb8dde0694c077ac3491e9aeb40e3b9bbedc394d /lisp/help.el
parent2d0eff42b8f1122e00f948759ed01a3be1a8c3fc (diff)
downloademacs-8f2a81510548d9ccce691c908eb9ca13414ea45c.tar.gz
Include narrowing indication in describe-mode
* lisp/help.el (describe-mode): Include "Narrow", if narrowing is active. (Bug#31139) Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 8e6604d2dba..844087a72f3 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -908,6 +908,10 @@ documentation for the major and minor modes of that buffer."
(push (list fmode pretty-minor-mode
(format-mode-line (assq mode minor-mode-alist)))
minor-modes)))))
+ ;; Narrowing is not a minor mode, but its indicator is part of
+ ;; mode-line-modes.
+ (when (buffer-narrowed-p)
+ (push '(narrow-to-region "Narrow" " Narrow") minor-modes))
(setq minor-modes
(sort minor-modes
(lambda (a b) (string-lessp (cadr a) (cadr b)))))