;;; 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)