From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 26 08:27:01 2013 Received: (at submit) by debbugs.gnu.org; 26 Oct 2013 12:27:01 +0000 Received: from localhost ([127.0.0.1]:44918 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Va2xI-0003Ez-26 for submit@debbugs.gnu.org; Sat, 26 Oct 2013 08:27:00 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52273) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Va2xF-0003Ef-90 for submit@debbugs.gnu.org; Sat, 26 Oct 2013 08:26:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Va2x3-0008Ul-4q for submit@debbugs.gnu.org; Sat, 26 Oct 2013 08:26:51 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48850) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Va2x3-0008Uh-2I for submit@debbugs.gnu.org; Sat, 26 Oct 2013 08:26:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Va2ww-0005WV-Lq for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2013 08:26:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Va2wq-0008UH-Ln for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2013 08:26:38 -0400 Received: from ptmx.org ([178.63.28.110]:52247) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Va2wq-0008Tx-GJ for bug-gnu-emacs@gnu.org; Sat, 26 Oct 2013 08:26:32 -0400 Received: from localhost (localhost [127.0.0.1]) by ptmx.org (Postfix) with ESMTP id 13A472B157; Sat, 26 Oct 2013 14:26:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at ptmx.org Received: from ptmx.org ([127.0.0.1]) by localhost (ptmx.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7kz56oMjJBUu; Sat, 26 Oct 2013 14:26:29 +0200 (CEST) Received: from descartes.localnet (chello080108246092.7.14.vie.surfer.at [80.108.246.92]) by ptmx.org (Postfix) with ESMTPSA id E983226A36; Sat, 26 Oct 2013 14:26:28 +0200 (CEST) From: =?ISO-8859-1?Q?R=FCdiger?= Sonderfeld To: bug-gnu-emacs@gnu.org Subject: [PATCH] Man: Add menu. Date: Sat, 26 Oct 2013 14:26:20 +0200 Message-ID: <1863547.6Ofn9Y3M5J@descartes> User-Agent: KMail/4.11.2 (Linux/3.11.0-12-generic; KDE/4.11.2; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) I wasn't sure if it is acceptable to use `cl-lib'. The check whether there is a "SEE ALSO" section could be simplified to (cl-member Man-see-also-regexp Man--sections :test #'string-match-p) * lisp/man.el (man-imenu-title): New defcustom. (Man-mode-map): Add menu entry. (Man-mode): Add imenu to menu. Signed-off-by: R=C3=BCdiger Sonderfeld --- lisp/man.el | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/lisp/man.el b/lisp/man.el index 5619803..a9dcd98 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -368,6 +368,12 @@ (defvar Man-support-local-filenames 'auto-detect Otherwise, the value is whatever the function `Man-support-local-filenames' should return.") =20 +(defcustom man-imenu-title "Contents" + "The title to use if man adds a Contents menu to the menubar. +Default is \"Contents\"." + :type 'string + :group 'man) + =0C ;; other variables and keymap initializations (defvar Man-original-frame) @@ -446,6 +452,31 @@ (defvar Man-mode-map ;; manual page can contain references to other man pages (define-key map "\r" 'man-follow) (define-key map "?" 'describe-mode) + + (easy-menu-define nil map + "`Man-mode' menu." + '("Man" + ["Next Section" Man-next-section t] + ["Previous Section" Man-previous-section t] + ["Go To Section..." Man-goto-section t] + ["Go To \"SEE ALSO\" Section" Man-goto-see-also-section + :active (let (m) + (dolist (sec Man--sections m) + (when (and (not m) + (string-match-p Man-see-also-regexp se= c)) + (setq m t))))] + ["Follow Reference..." Man-follow-manual-reference + :active Man--refpages + :help "Go to a manpage referred to in the \"SEE ALSO\" sectio= n"] + "--" + ["Next Manpage" Man-next-manpage + :active (> (length Man-page-list) 1)] + ["Previous Manpage" Man-previous-manpage + :active (> (length Man-page-list) 1)] + "--" + ["Man..." man t] + ["Kill Buffer" Man-kill t] + ["Quit" Man-quit t])) map) "Keymap for Man mode.") =20 @@ -1396,6 +1427,7 @@ (define-derived-mode Man-mode fundamental-mode "M= an" (buffer-disable-undo) (auto-fill-mode -1) (setq imenu-generic-expression (list (list nil Man-heading-regexp 0)= )) + (imenu-add-to-menubar man-imenu-title) (set (make-local-variable 'outline-regexp) Man-heading-regexp) (set (make-local-variable 'outline-level) (lambda () 1)) (set (make-local-variable 'bookmark-make-record-function) --=20 1.8.4.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 26 15:08:00 2013 Received: (at 15722) by debbugs.gnu.org; 26 Oct 2013 19:08:00 +0000 Received: from localhost ([127.0.0.1]:45918 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Va9DM-0004wR-1m for submit@debbugs.gnu.org; Sat, 26 Oct 2013 15:08:00 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:48907 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Va9DJ-0004wI-PE for 15722@debbugs.gnu.org; Sat, 26 Oct 2013 15:07:58 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Va9DI-0003tm-2S; Sat, 26 Oct 2013 15:07:56 -0400 From: Glenn Morris To: =?utf-8?Q?R=C3=BCdiger?= Sonderfeld Subject: Re: bug#15722: [PATCH] Man: Add menu. References: <1863547.6Ofn9Y3M5J@descartes> X-Spook: IRA Mossad freedom spy Roswell AGT. AMME subversive X-Ran: "+{3,U>KdUL`D.@l%3?%woIfR-6`xLA[1F3y%A&ZEXT5(fzm0[_N@2w}SxoUoA^vD2)hPm X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Sat, 26 Oct 2013 15:07:55 -0400 In-Reply-To: <1863547.6Ofn9Y3M5J@descartes> (=?utf-8?Q?=22R=C3=BCdiger?= Sonderfeld"'s message of "Sat, 26 Oct 2013 14:26:20 +0200") Message-ID: <7z61sjsvec.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: 15722 Cc: 15722@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) R=C3=BCdiger Sonderfeld wrote: > I wasn't sure if it is acceptable to use `cl-lib'. It is. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 26 15:17:10 2013 Received: (at 15722) by debbugs.gnu.org; 26 Oct 2013 19:17:10 +0000 Received: from localhost ([127.0.0.1]:45946 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Va9MD-0005CS-Mc for submit@debbugs.gnu.org; Sat, 26 Oct 2013 15:17:10 -0400 Received: from ptmx.org ([178.63.28.110]:45179) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Va9MB-0005CK-Ah for 15722@debbugs.gnu.org; Sat, 26 Oct 2013 15:17:08 -0400 Received: from localhost (localhost [127.0.0.1]) by ptmx.org (Postfix) with ESMTP id 1AC7F2B1B6; Sat, 26 Oct 2013 21:17:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at ptmx.org Received: from ptmx.org ([127.0.0.1]) by localhost (ptmx.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tWwrKj7PJSoT; Sat, 26 Oct 2013 21:17:04 +0200 (CEST) Received: from descartes.localnet (chello080108246092.7.14.vie.surfer.at [80.108.246.92]) by ptmx.org (Postfix) with ESMTPSA id BB4E72A728; Sat, 26 Oct 2013 21:17:03 +0200 (CEST) From: =?ISO-8859-1?Q?R=FCdiger?= Sonderfeld To: Glenn Morris Subject: [PATCH] Man: Add menu. Date: Sat, 26 Oct 2013 21:16:54 +0200 Message-ID: <10639495.1VFYxECAcK@descartes> User-Agent: KMail/4.11.2 (Linux/3.11.0-12-generic; KDE/4.11.2; x86_64; ; ) In-Reply-To: <7z61sjsvec.fsf@fencepost.gnu.org> References: <7z61sjsvec.fsf@fencepost.gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 15722 Cc: 15722@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) * lisp/man.el (man-imenu-title): New defcustom. (Man-mode-map): Add menu entry. (Man-mode): Add imenu to menu. Signed-off-by: R=C3=BCdiger Sonderfeld --- lisp/man.el | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lisp/man.el b/lisp/man.el index 5619803..76ce6c3 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -89,6 +89,7 @@ ;;; Code: =20 (require 'ansi-color) +(require 'cl-lib) (require 'button) =20 (defgroup man nil @@ -368,6 +369,12 @@ (defvar Man-support-local-filenames 'auto-detect Otherwise, the value is whatever the function `Man-support-local-filenames' should return.") =20 +(defcustom man-imenu-title "Contents" + "The title to use if man adds a Contents menu to the menubar. +Default is \"Contents\"." + :type 'string + :group 'man) + =0C ;; other variables and keymap initializations (defvar Man-original-frame) @@ -446,6 +453,28 @@ (defvar Man-mode-map ;; manual page can contain references to other man pages (define-key map "\r" 'man-follow) (define-key map "?" 'describe-mode) + + (easy-menu-define nil map + "`Man-mode' menu." + '("Man" + ["Next Section" Man-next-section t] + ["Previous Section" Man-previous-section t] + ["Go To Section..." Man-goto-section t] + ["Go To \"SEE ALSO\" Section" Man-goto-see-also-section + :active (cl-member Man-see-also-regexp Man--sections + :test #'string-match-p)] + ["Follow Reference..." Man-follow-manual-reference + :active Man--refpages + :help "Go to a manpage referred to in the \"SEE ALSO\" sectio= n"] + "--" + ["Next Manpage" Man-next-manpage + :active (> (length Man-page-list) 1)] + ["Previous Manpage" Man-previous-manpage + :active (> (length Man-page-list) 1)] + "--" + ["Man..." man t] + ["Kill Buffer" Man-kill t] + ["Quit" Man-quit t])) map) "Keymap for Man mode.") =20 @@ -1396,6 +1425,7 @@ (define-derived-mode Man-mode fundamental-mode "M= an" (buffer-disable-undo) (auto-fill-mode -1) (setq imenu-generic-expression (list (list nil Man-heading-regexp 0)= )) + (imenu-add-to-menubar man-imenu-title) (set (make-local-variable 'outline-regexp) Man-heading-regexp) (set (make-local-variable 'outline-level) (lambda () 1)) (set (make-local-variable 'bookmark-make-record-function) --=20 1.8.4.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 26 22:04:19 2013 Received: (at 15722-done) by debbugs.gnu.org; 27 Oct 2013 02:04:19 +0000 Received: from localhost ([127.0.0.1]:46615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VaFiE-00080f-NU for submit@debbugs.gnu.org; Sat, 26 Oct 2013 22:04:18 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:52525 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VaFiC-00080V-9x for 15722-done@debbugs.gnu.org; Sat, 26 Oct 2013 22:04:16 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VaFiB-0001kJ-AD; Sat, 26 Oct 2013 22:04:15 -0400 From: Glenn Morris To: 15722-done@debbugs.gnu.org Subject: Re: [PATCH] Man: Add menu. References: <7z61sjsvec.fsf@fencepost.gnu.org> <10639495.1VFYxECAcK@descartes> X-Spook: USCODE TWA Freeh target SEAL Team 6 secure data haven X-Ran: ^_//)T&$(NSvp6J'V&QmnFtBBa.Efsc;`!Tl38\&KuAVu9Etr8ej8"]tm`&7bV$.B?K!.X X-Hue: cyan X-Debbugs-No-Ack: yes X-Attribution: GM Date: Sat, 26 Oct 2013 22:04:14 -0400 In-Reply-To: <10639495.1VFYxECAcK@descartes> (=?utf-8?Q?=22R=C3=BCdiger?= Sonderfeld"'s message of "Sat, 26 Oct 2013 21:16:54 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.4 (-----) X-Debbugs-Envelope-To: 15722-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) Version: 24.4 Thank you, applied. Trivial comments follow: R=C3=BCdiger Sonderfeld wrote: > +(defcustom man-imenu-title "Contents" > + "The title to use if man adds a Contents menu to the menubar. > +Default is \"Contents\"." No need to say what the default is, since that information is automatically available. New defcustoms need :version tags. BTW, I suggest you create a Savannah account and request membership of the Emacs project so that you can commit these things yourself. From unknown Fri Aug 15 16:25:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 24 Nov 2013 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator