unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Hendricks <michael@ndrix.org>
To: 31139@debbugs.gnu.org
Cc: Michael Hendricks <michael@ndrix.org>,
	Noam Postavsky <npostavs@gmail.com>
Subject: bug#31139: [PATCH] Document Narrow indicator in describe-mode
Date: Tue, 24 Apr 2018 09:00:13 -0600	[thread overview]
Message-ID: <20180424150013.60226-1-michael@ndrix.org> (raw)
In-Reply-To: <87po2vs85p.fsf@gmail.com>

* 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





  parent reply	other threads:[~2018-04-24 15:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12 17:12 bug#31139: [PATCH] Document Narrow indicator in describe-mode Michael Hendricks
2018-04-12 23:36 ` Noam Postavsky
2018-04-17 18:59   ` Michael Hendricks
2018-04-19 12:16 ` Noam Postavsky
2018-04-19 13:08   ` Eli Zaretskii
2018-04-19 14:38   ` Michael Hendricks
2018-04-19 14:44     ` Eli Zaretskii
2018-04-24 15:00   ` Michael Hendricks [this message]
2018-05-05  9:44     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180424150013.60226-1-michael@ndrix.org \
    --to=michael@ndrix.org \
    --cc=31139@debbugs.gnu.org \
    --cc=npostavs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).