Mercurial > hg > xemacs-beta
comparison lisp/packages/man.el @ 120:cca96a509cfe r20-1b12
Import from CVS: tag r20-1b12
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:25:29 +0200 |
parents | cf808b4c4290 |
children | 318232e2a3f0 |
comparison
equal
deleted
inserted
replaced
119:d101af7320b8 | 120:cca96a509cfe |
---|---|
28 ;; output, end of story. | 28 ;; output, end of story. |
29 ;; | 29 ;; |
30 ;; [ older changelog entries removed, since they're all about code that | 30 ;; [ older changelog entries removed, since they're all about code that |
31 ;; I've deleted. ] | 31 ;; I've deleted. ] |
32 | 32 |
33 (defvar Manual-program "man" "\ | 33 (defgroup man nil |
34 *Name of the program to invoke in order to format the source man pages.") | 34 "Browse manual pages" |
35 | 35 :group 'help) |
36 (defvar Manual-buffer-view-mode t "\ | 36 |
37 (defcustom Manual-program "man" "\ | |
38 *Name of the program to invoke in order to format the source man pages." | |
39 :type 'string | |
40 :group 'man) | |
41 | |
42 (defcustom Manual-buffer-view-mode t "\ | |
37 *Whether manual buffers should be placed in view-mode. | 43 *Whether manual buffers should be placed in view-mode. |
38 nil means leave the buffer in fundamental-mode in another window. | 44 nil means leave the buffer in fundamental-mode in another window. |
39 t means use `view-buffer' to display the man page in the current window. | 45 t means use `view-buffer' to display the man page in the current window. |
40 Any other value means use `view-buffer-other-window'.") | 46 Any other value means use `view-buffer-other-window'." |
41 | 47 :type '(choice (const :tag "fundamental-mode other window" nil) |
42 (defvar Manual-mode-hook nil | 48 (const :tag "view-mode current window" t) |
43 "Function or functions run on entry to Manual-mode.") | 49 (const :tag "view-mode other window" other)) |
50 :group 'man) | |
51 | |
52 (defcustom Manual-mode-hook nil | |
53 "Function or functions run on entry to Manual-mode." | |
54 :type 'hook | |
55 :group 'man) | |
44 | 56 |
45 (defvar Manual-page-history nil "\ | 57 (defvar Manual-page-history nil "\ |
46 A list of names of previously visited man page buffers.") | 58 A list of names of previously visited man page buffers.") |
47 | 59 |
48 | 60 |
49 ;; New variables. | 61 ;; New variables. |
50 | 62 |
51 (defvar Manual-use-rosetta-man (not (null (locate-file "rman" exec-path))) "\ | 63 (defcustom Manual-use-rosetta-man (not (null (locate-file "rman" exec-path))) "\ |
52 If non-nil, use RosettaMan (rman) to filter man pages. | 64 If non-nil, use RosettaMan (rman) to filter man pages. |
53 This makes man-page cleanup virtually instantaneous, instead of | 65 This makes man-page cleanup virtually instantaneous, instead of |
54 potentially taking a long time. | 66 potentially taking a long time. |
55 | 67 |
56 Here is information on RosettaMan, from Neal.Becker@comsat.com (Neal Becker): | 68 Here is information on RosettaMan, from Neal.Becker@comsat.com (Neal Becker): |
110 control characters. Better, if you can think of heuristics that | 122 control characters. Better, if you can think of heuristics that |
111 distinguish tables from ordinary text, I'd like to hear them. | 123 distinguish tables from ordinary text, I'd like to hear them. |
112 | 124 |
113 | 125 |
114 Notes for HTML consumers: This filter does real (heuristic) | 126 Notes for HTML consumers: This filter does real (heuristic) |
115 parsing--no <PRE>! Man page references are turned into hypertext links.") | 127 parsing--no <PRE>! Man page references are turned into hypertext links." |
116 | 128 :type 'boolean |
117 (make-face 'man-italic) | 129 :group 'man) |
118 (or (face-differs-from-default-p 'man-italic) | 130 |
119 (copy-face 'italic 'man-italic)) | 131 (defface man-italic '((t (:italic t))) |
120 ;; XEmacs (from Darrell Kindred): underlining is annoying due to | 132 "Manual italics face" |
121 ;; large blank spaces in this face. | 133 :group 'man) |
122 ;; (or (face-differs-from-default-p 'man-italic) | 134 |
123 ;; (set-face-underline-p 'man-italic t)) | 135 (defface man-bold '((t (:bold t))) |
124 | 136 "Manual bold face" |
125 (make-face 'man-bold) | 137 :group 'man) |
126 (or (face-differs-from-default-p 'man-bold) | 138 |
127 (copy-face 'bold 'man-bold)) | 139 (defface man-heading '((t (:bold t))) |
128 (or (face-differs-from-default-p 'man-bold) | 140 "Manual headings face" |
129 (copy-face 'man-italic 'man-bold)) | 141 :group 'man) |
130 | 142 |
131 (make-face 'man-heading) | 143 (defface man-xref '((t (:underline t))) |
132 (or (face-differs-from-default-p 'man-heading) | 144 "Manual xrefs face" |
133 (copy-face 'man-bold 'man-heading)) | 145 :group 'man) |
134 | 146 |
135 (make-face 'man-xref) | |
136 (or (face-differs-from-default-p 'man-xref) | |
137 (set-face-underline-p 'man-xref t)) | |
138 | 147 |
139 (defvar Manual-mode-map | 148 (defvar Manual-mode-map |
140 (let ((m (make-sparse-keymap))) | 149 (let ((m (make-sparse-keymap))) |
141 (set-keymap-name m 'Manual-mode-map) | 150 (set-keymap-name m 'Manual-mode-map) |
142 (define-key m "l" 'Manual-last-page) | 151 (define-key m "l" 'Manual-last-page) |