emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/woman.el,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/woman.el,v
Date: Mon, 28 Aug 2006 15:40:22 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      06/08/28 15:40:21

Index: woman.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/woman.el,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- woman.el    6 Apr 2006 08:44:24 -0000       1.44
+++ woman.el    28 Aug 2006 15:40:21 -0000      1.45
@@ -1750,7 +1750,18 @@
   (define-key woman-mode-map [M-mouse-2] 'woman-follow-word)
 
   ;; We don't need to call `man' when we are in `woman-mode'.
-  (define-key woman-mode-map [remap man] 'woman))
+  (define-key woman-mode-map [remap man] 'woman)
+  (define-key woman-mode-map [remap man-follow] 'woman-follow))
+
+(defun woman-follow (topic)
+  "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 topic)
+         (string= topic ""))
+      (error "No item under point")
+    (woman (if (string-match Man-reference-regexp topic)
+              (substring topic 0 (match-end 1))
+            topic))))
 
 (defun woman-follow-word (event)
   "Run WoMan with word under mouse as topic.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]