[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114816: Add menu for M-x man
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r114816: Add menu for M-x man |
Date: |
Sun, 27 Oct 2013 02:02:08 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114816
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15722
author: RĂ¼diger Sonderfeld <address@hidden>
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2013-10-26 19:02:02 -0700
message:
Add menu for M-x man
* lisp/man.el (man-imenu-title): New option.
(Man-mode-map): Add menu.
(Man-mode): Add imenu to menu.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/man.el man.el-20091113204419-o5vbwnq5f7feedwu-582
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-10-26 01:16:37 +0000
+++ b/lisp/ChangeLog 2013-10-27 02:02:02 +0000
@@ -1,3 +1,9 @@
+2013-10-27 RĂ¼diger Sonderfeld <address@hidden>
+
+ * man.el (man-imenu-title): New option.
+ (Man-mode-map): Add menu. (Bug#15722)
+ (Man-mode): Add imenu to menu.
+
2013-10-26 Dmitry Gutov <address@hidden>
* progmodes/ruby-mode.el (ruby-smie--args-separator-p): Be more
=== modified file 'lisp/man.el'
--- a/lisp/man.el 2013-10-13 00:31:19 +0000
+++ b/lisp/man.el 2013-10-27 02:02:02 +0000
@@ -89,6 +89,7 @@
;;; Code:
(require 'ansi-color)
+(require 'cl-lib)
(require 'button)
(defgroup man nil
@@ -368,6 +369,12 @@
Otherwise, the value is whatever the function
`Man-support-local-filenames' should return.")
+(defcustom man-imenu-title "Contents"
+ "The title to use if man adds a Contents menu to the menubar."
+ :version "24.4"
+ :type 'string
+ :group 'man)
+
;; other variables and keymap initializations
(defvar Man-original-frame)
@@ -446,6 +453,28 @@
;; 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\" section"]
+ "--"
+ ["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.")
@@ -1396,6 +1425,7 @@
(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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114816: Add menu for M-x man,
Glenn Morris <=