emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 8f2a815: Include narrowing indication in describe-m


From: Eli Zaretskii
Subject: [Emacs-diffs] master 8f2a815: Include narrowing indication in describe-mode
Date: Sat, 5 May 2018 05:43:58 -0400 (EDT)

branch: master
commit 8f2a81510548d9ccce691c908eb9ca13414ea45c
Author: Michael Hendricks <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Include narrowing indication in describe-mode
    
    * lisp/help.el (describe-mode): Include "Narrow", if narrowing is
    active.  (Bug#31139)
    
    Copyright-paperwork-exempt: yes
---
 lisp/help.el | 4 ++++
 1 file changed, 4 insertions(+)

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



reply via email to

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