1 |
;;; man.el --- browse UNIX manual pages |
;;; man.el --- browse UNIX manual pages -*- coding: iso-8859-1 -*- |
2 |
|
|
3 |
;; Copyright (C) 1993, 1994, 1996, 1997, 2001 Free Software Foundation, Inc. |
;; Copyright (C) 1993, 1994, 1996, 1997, 2001, 2003 Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Author: Barry A. Warsaw <bwarsaw@cen.com> |
;; Author: Barry A. Warsaw <bwarsaw@cen.com> |
6 |
;; Maintainer: FSF |
;; Maintainer: FSF |
241 |
(defvar Man-cooked-hook nil |
(defvar Man-cooked-hook nil |
242 |
"Hook run after removing backspaces but before `Man-mode' processing.") |
"Hook run after removing backspaces but before `Man-mode' processing.") |
243 |
|
|
244 |
(defvar Man-name-regexp "[-a-zA-Z0-9_][-a-zA-Z0-9_.]*" |
(defvar Man-name-regexp "[-a-zA-Z0-9_][-a-zA-Z0-9_.]*" |
245 |
"Regular expression describing the name of a manpage (without section).") |
"Regular expression describing the name of a manpage (without section).") |
246 |
|
|
247 |
(defvar Man-section-regexp "[0-9][a-zA-Z+]*\\|[LNln]" |
(defvar Man-section-regexp "[0-9][a-zA-Z+]*\\|[LNln]" |
999 |
;; Update len, in case a reference spans |
;; Update len, in case a reference spans |
1000 |
;; more than two lines (paranoia). |
;; more than two lines (paranoia). |
1001 |
len (1- (length word)))) |
len (1- (length word)))) |
1002 |
(if (= (aref word len) ?-) |
(if (memq (aref word len) '(?- ?)) |
1003 |
(setq hyphenated (substring word 0 len))) |
(setq hyphenated (substring word 0 len))) |
1004 |
(if (string-match Man-reference-regexp word) |
(if (string-match Man-reference-regexp word) |
1005 |
(aput 'Man-refpages-alist word)))) |
(aput 'Man-refpages-alist word)))) |