Mercurial > emacs
comparison lisp/man.el @ 51376:ec20af5e04b3
(Man-name-regexp): Also match Latin-1 soft hyphen.
(Man-build-references-alist): Handle Latin-1 soft hyphen.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Sun, 01 Jun 2003 17:06:55 +0000 |
parents | c7575377858f |
children | ebe64300a9d5 |
comparison
equal
deleted
inserted
replaced
51375:2e1886ab346d | 51376:ec20af5e04b3 |
---|---|
1 ;;; man.el --- browse UNIX manual pages | 1 ;;; man.el --- browse UNIX manual pages -*- coding: iso-8859-1 -*- |
2 | 2 |
3 ;; Copyright (C) 1993, 1994, 1996, 1997, 2001 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1993, 1994, 1996, 1997, 2001, 2003 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Barry A. Warsaw <bwarsaw@cen.com> | 5 ;; Author: Barry A. Warsaw <bwarsaw@cen.com> |
6 ;; Maintainer: FSF | 6 ;; Maintainer: FSF |
7 ;; Keywords: help | 7 ;; Keywords: help |
8 ;; Adapted-By: ESR, pot | 8 ;; Adapted-By: ESR, pot |
239 "Hook run when Man mode is enabled.") | 239 "Hook run when Man mode is enabled.") |
240 | 240 |
241 (defvar Man-cooked-hook nil | 241 (defvar Man-cooked-hook nil |
242 "Hook run after removing backspaces but before `Man-mode' processing.") | 242 "Hook run after removing backspaces but before `Man-mode' processing.") |
243 | 243 |
244 (defvar Man-name-regexp "[-a-zA-Z0-9_][-a-zA-Z0-9_.]*" | 244 (defvar Man-name-regexp "[-a-zA-Z0-9_][-a-zA-Z0-9_.]*" |
245 "Regular expression describing the name of a manpage (without section).") | 245 "Regular expression describing the name of a manpage (without section).") |
246 | 246 |
247 (defvar Man-section-regexp "[0-9][a-zA-Z+]*\\|[LNln]" | 247 (defvar Man-section-regexp "[0-9][a-zA-Z+]*\\|[LNln]" |
248 "Regular expression describing a manpage section within parentheses.") | 248 "Regular expression describing a manpage section within parentheses.") |
249 | 249 |
997 (setq word (concat hyphenated word) | 997 (setq word (concat hyphenated word) |
998 hyphenated nil | 998 hyphenated nil |
999 ;; Update len, in case a reference spans | 999 ;; Update len, in case a reference spans |
1000 ;; more than two lines (paranoia). | 1000 ;; more than two lines (paranoia). |
1001 len (1- (length word)))) | 1001 len (1- (length word)))) |
1002 (if (= (aref word len) ?-) | 1002 (if (memq (aref word len) '(?- ?)) |
1003 (setq hyphenated (substring word 0 len))) | 1003 (setq hyphenated (substring word 0 len))) |
1004 (if (string-match Man-reference-regexp word) | 1004 (if (string-match Man-reference-regexp word) |
1005 (aput 'Man-refpages-alist word)))) | 1005 (aput 'Man-refpages-alist word)))) |
1006 (skip-chars-forward " \t\n,")))))) | 1006 (skip-chars-forward " \t\n,")))))) |
1007 (setq Man-refpages-alist (nreverse Man-refpages-alist))) | 1007 (setq Man-refpages-alist (nreverse Man-refpages-alist))) |