diff lisp/woman.el @ 69793:93d87ad179a4

* man.el (Man-mode-map): Restore the \r binding. (Man-abstract-xref-man-page): If Man-target-string is a function, call it. (Man-highlight-references): Use Man-default-man-entry to get the target. Deal with xrefs too. (Man-highlight-references0): Don't call the target function. * woman.el (WoMan-xref-man-page): Strip the section number, woman cannot deal with it.
author Dan Nicolaescu <dann@ics.uci.edu>
date Tue, 04 Apr 2006 16:46:03 +0000
parents 3bd95f4f2941
children a77e27984bb1
line wrap: on
line diff
--- a/lisp/woman.el	Tue Apr 04 12:46:32 2006 +0000
+++ b/lisp/woman.el	Tue Apr 04 16:46:03 2006 +0000
@@ -428,7 +428,13 @@
 (require 'button)
 (define-button-type 'WoMan-xref-man-page 
   :supertype 'Man-abstract-xref-man-page
-  'func 'woman)
+  'func (lambda (arg)
+	  (woman
+	   ;; `woman' cannot deal with arguments that contain a
+	   ;; section name, like close(2), so strip the section name.
+	   (if (string-match Man-reference-regexp arg)
+	       (subqstring arg 0 (match-end 1))
+	     arg))))
 
 (eval-when-compile			; to avoid compiler warnings
   (require 'dired)