diff lisp/woman.el @ 90381:65ca8fb66a0d

Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-54 Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 190-203) - Update from CVS - Undo incorrect merge of etc/images/README from Gnus 5.10 - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 74-80) - Update from CVS - Update from CVS: README: Addition from 5.10.6 tar ball.
author Miles Bader <miles@gnu.org>
date Sun, 09 Apr 2006 00:38:22 +0000
parents c5406394f567 a77e27984bb1
children c358d0861b16
line wrap: on
line diff
--- a/lisp/woman.el	Fri Apr 07 12:02:40 2006 +0000
+++ b/lisp/woman.el	Sun Apr 09 00:38:22 2006 +0000
@@ -381,7 +381,7 @@
 ;; code fragments, general interest, etc.:
 ;;   Jari Aalto <jari.aalto@cs.tpu.fi>
 ;;   Dean Andrews <dean@dra.com>
-;;   Juanma Barranquero <barranquero@laley-actualidad.es>
+;;   Juanma Barranquero <lekktu@gmail.com>
 ;;   Karl Berry <kb@cs.umb.edu>
 ;;   Jim Chapman <jchapman@netcomuk.co.uk>
 ;;   Kin Cho <kin@neoscale.com>
@@ -426,9 +426,15 @@
 
 (require 'man)
 (require 'button)
-(define-button-type 'WoMan-xref-man-page 
+(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)
+	       (substring arg 0 (match-end 1))
+	     arg))))
 
 (eval-when-compile			; to avoid compiler warnings
   (require 'dired)