From: Michael Hendricks Date: Sat, 5 May 2018 09:41:43 +0000 (+0300) Subject: Include narrowing indication in describe-mode X-Git-Tag: emacs-27.0.90~5053 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8f2a81510548d9ccce691c908eb9ca13414ea45c;p=emacs.git Include narrowing indication in describe-mode * lisp/help.el (describe-mode): Include "Narrow", if narrowing is active. (Bug#31139) Copyright-paperwork-exempt: yes --- 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)))))