summaryrefslogtreecommitdiff
path: root/lisp/man.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1997-03-01 17:45:36 +0000
committerKarl Heuer <kwzh@gnu.org>1997-03-01 17:45:36 +0000
commit87d32df2247a952e2bc42b323bf66f175e5b4563 (patch)
tree5d16c765879c8db9eb223145c4a43f4a999086e1 /lisp/man.el
parentcfd4b672a993ddcb47833a020142be61912fde36 (diff)
downloademacs-87d32df2247a952e2bc42b323bf66f175e5b4563.tar.gz
(man-follow): New function.
(Man-mode-map): Bind it.
Diffstat (limited to 'lisp/man.el')
-rw-r--r--lisp/man.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/man.el b/lisp/man.el
index 5d405ad4ba2..eb1e3a34b50 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -309,6 +309,7 @@ This regular expression should start with a `^' character.")
(define-key Man-mode-map "k" 'Man-kill)
(define-key Man-mode-map "q" 'Man-quit)
(define-key Man-mode-map "m" 'man)
+ (define-key Man-mode-map "\r" 'man-follow)
(define-key Man-mode-map "?" 'describe-mode)
)
@@ -523,6 +524,14 @@ If a buffer already exists for this man page, it will display immediately."
(Man-getpage-in-background man-args))
+;;;###autoload
+(defun man-follow (man-args)
+ "Get a Un*x manual page of the item under point and put it in a buffer."
+ (interactive (list (Man-default-man-entry)))
+ (if (or (not man-args)
+ (string= man-args ""))
+ (error "No item under point")
+ (man man-args)))
(defun Man-getpage-in-background (topic)
"Uses TOPIC to build and fire off the manpage and cleaning command."