]> code.delx.au - gnu-emacs/blobdiff - lisp/woman.el
(ewoc--node-branch): Merge into unique caller.
[gnu-emacs] / lisp / woman.el
index 5e8aff75e7f70cfc6e83059d0bd12a96b97b3e05..2392d0bfa4cacffba3073c27b78a2a615f390df4 100644 (file)
@@ -1,6 +1,7 @@
 ;;; woman.el --- browse UN*X manual pages `wo (without) man'
 
-;; Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2002, 2003, 2004, 2005,
+;;   2006 Free Software Foundation, Inc.
 
 ;; Author: Francis J. Wright <F.J.Wright@qmul.ac.uk>
 ;; Maintainer: FSF
 ;; 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>
 
 (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)