bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31139: [PATCH] Document Narrow indicator in describe-mode


From: Michael Hendricks
Subject: bug#31139: [PATCH] Document Narrow indicator in describe-mode
Date: Tue, 24 Apr 2018 09:00:13 -0600

* lisp/help.el (describe-mode): document narrowing, if active
---
 lisp/help.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/help.el b/lisp/help.el
index 8e6604d2db..844087a72f 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)))))
-- 
2.14.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]