diff options
| author | Michael Hendricks | 2018-05-05 12:41:43 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2018-05-05 12:41:43 +0300 |
| commit | 8f2a81510548d9ccce691c908eb9ca13414ea45c (patch) | |
| tree | cb8dde0694c077ac3491e9aeb40e3b9bbedc394d | |
| parent | 2d0eff42b8f1122e00f948759ed01a3be1a8c3fc (diff) | |
| download | emacs-8f2a81510548d9ccce691c908eb9ca13414ea45c.tar.gz emacs-8f2a81510548d9ccce691c908eb9ca13414ea45c.zip | |
Include narrowing indication in describe-mode
* lisp/help.el (describe-mode): Include "Narrow", if narrowing is
active. (Bug#31139)
Copyright-paperwork-exempt: yes
| -rw-r--r-- | lisp/help.el | 4 |
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." | |||
| 908 | (push (list fmode pretty-minor-mode | 908 | (push (list fmode pretty-minor-mode |
| 909 | (format-mode-line (assq mode minor-mode-alist))) | 909 | (format-mode-line (assq mode minor-mode-alist))) |
| 910 | minor-modes))))) | 910 | minor-modes))))) |
| 911 | ;; Narrowing is not a minor mode, but its indicator is part of | ||
| 912 | ;; mode-line-modes. | ||
| 913 | (when (buffer-narrowed-p) | ||
| 914 | (push '(narrow-to-region "Narrow" " Narrow") minor-modes)) | ||
| 911 | (setq minor-modes | 915 | (setq minor-modes |
| 912 | (sort minor-modes | 916 | (sort minor-modes |
| 913 | (lambda (a b) (string-lessp (cadr a) (cadr b))))) | 917 | (lambda (a b) (string-lessp (cadr a) (cadr b))))) |