aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2000-03-12 14:49:20 +0000
committerDave Love2000-03-12 14:49:20 +0000
commit5bbf0b3c7fafe20d1d73aa95ecd9f5c476dfbee8 (patch)
tree0b6da41b609776fa91bc519bf9b73525cf244ffd
parent4bce8c17dd594abc2dd1d1be1e636bac113bfd01 (diff)
downloademacs-5bbf0b3c7fafe20d1d73aa95ecd9f5c476dfbee8.tar.gz
emacs-5bbf0b3c7fafe20d1d73aa95ecd9f5c476dfbee8.zip
Doc fixes.
(Man-init-defvars): Use display-color-p to set fontification.
-rw-r--r--lisp/man.el64
1 files changed, 34 insertions, 30 deletions
diff --git a/lisp/man.el b/lisp/man.el
index 4befb416149..45fd98ab91a 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -3,6 +3,7 @@
3;; Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc. 3;; Copyright (C) 1993, 1994, 1996, 1997 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;; Keywords: help 7;; Keywords: help
7;; Adapted-By: ESR, pot 8;; Adapted-By: ESR, pot
8 9
@@ -33,7 +34,7 @@
33;; ALSO references, and other features. See below or do `?' in a 34;; ALSO references, and other features. See below or do `?' in a
34;; manual page buffer for details. 35;; manual page buffer for details.
35 36
36;; ========== Credits and History ========== 37;; ========== Credits and History ==========
37;; In mid 1991, several people posted some interesting improvements to 38;; In mid 1991, several people posted some interesting improvements to
38;; man.el from the standard emacs 18.57 distribution. I liked many of 39;; man.el from the standard emacs 18.57 distribution. I liked many of
39;; these, but wanted everything in one single package, so I decided 40;; these, but wanted everything in one single package, so I decided
@@ -128,7 +129,7 @@ the manpage buffer."
128(defvar Man-sections-alist) 129(defvar Man-sections-alist)
129(defvar Man-refpages-alist) 130(defvar Man-refpages-alist)
130(defvar Man-uses-untabify-flag t 131(defvar Man-uses-untabify-flag t
131 "When non-nil use `untabify' instead of Man-untabify-command.") 132 "Non-nil means use `untabify' instead of `Man-untabify-command'.")
132(defvar Man-page-mode-string) 133(defvar Man-page-mode-string)
133(defvar Man-sed-script nil 134(defvar Man-sed-script nil
134 "Script for sed to nuke backspaces and ANSI codes from manpages.") 135 "Script for sed to nuke backspaces and ANSI codes from manpages.")
@@ -137,7 +138,7 @@ the manpage buffer."
137;; user variables 138;; user variables
138 139
139(defcustom Man-fontify-manpage-flag t 140(defcustom Man-fontify-manpage-flag t
140 "*Make up the manpage with fonts." 141 "*Non-nil means make up the manpage with fonts."
141 :type 'boolean 142 :type 'boolean
142 :group 'man) 143 :group 'man)
143 144
@@ -179,7 +180,7 @@ Any other value of `Man-notify-method' is equivalent to `meek'."
179 :group 'man) 180 :group 'man)
180 181
181(defcustom Man-downcase-section-letters-flag t 182(defcustom Man-downcase-section-letters-flag t
182 "*Letters in sections are converted to lower case. 183 "*Non-nil means letters in sections are converted to lower case.
183Some Un*x man commands can't handle uppercase letters in sections, for 184Some Un*x man commands can't handle uppercase letters in sections, for
184example \"man 2V chmod\", but they are often displayed in the manpage 185example \"man 2V chmod\", but they are often displayed in the manpage
185with the upper case letter. When this variable is t, the section 186with the upper case letter. When this variable is t, the section
@@ -189,7 +190,7 @@ being sent to the man background process."
189 :group 'man) 190 :group 'man)
190 191
191(defcustom Man-circular-pages-flag t 192(defcustom Man-circular-pages-flag t
192 "*If t, the manpage list is treated as circular for traversal." 193 "*Non-nil means the manpage list is treated as circular for traversal."
193 :type 'boolean 194 :type 'boolean
194 :group 'man) 195 :group 'man)
195 196
@@ -216,7 +217,7 @@ the associated section number."
216 "Command used for untabifying.") 217 "Command used for untabifying.")
217 218
218(defvar Man-untabify-command-args (list "-t" "-e") 219(defvar Man-untabify-command-args (list "-t" "-e")
219 "List of arguments to be passed to Man-untabify-command (which see).") 220 "List of arguments to be passed to `Man-untabify-command' (which see).")
220 221
221(defvar Man-sed-command "sed" 222(defvar Man-sed-command "sed"
222 "Command used for processing sed scripts.") 223 "Command used for processing sed scripts.")
@@ -245,7 +246,7 @@ the associated section number."
245 "Hook run when Man mode is enabled.") 246 "Hook run when Man mode is enabled.")
246 247
247(defvar Man-cooked-hook nil 248(defvar Man-cooked-hook nil
248 "Hook run after removing backspaces but before Man-mode processing.") 249 "Hook run after removing backspaces but before `Man-mode' processing.")
249 250
250(defvar Man-name-regexp "[-a-zA-Z0-9_][-a-zA-Z0-9_.]*" 251(defvar Man-name-regexp "[-a-zA-Z0-9_][-a-zA-Z0-9_.]*"
251 "Regular expression describing the name of a manpage (without section).") 252 "Regular expression describing the name of a manpage (without section).")
@@ -363,13 +364,13 @@ This regular expression should start with a `^' character.")
363;; utilities 364;; utilities
364 365
365(defun Man-init-defvars () 366(defun Man-init-defvars ()
366 "Used for initialising variables based on the value of window-system. 367 "Used for initialising variables based on the value of `window-system'.
367This is necessary if one wants to dump man.el with emacs." 368This is necessary if one wants to dump man.el with Emacs."
368 369
369 ;; The following is necessary until fonts are implemented on 370 ;; The following is necessary until fonts are implemented on
370 ;; terminals. 371 ;; terminals.
371 (setq Man-fontify-manpage-flag (and Man-fontify-manpage-flag 372 (setq Man-fontify-manpage-flag (and Man-fontify-manpage-flag
372 window-system)) 373 (display-color-p)))
373 374
374 ;; Avoid possible error in call-process by using a directory that must exist. 375 ;; Avoid possible error in call-process by using a directory that must exist.
375 (let ((default-directory "/")) 376 (let ((default-directory "/"))
@@ -575,7 +576,7 @@ If a buffer already exists for this man page, it will display immediately."
575 (man man-args))) 576 (man man-args)))
576 577
577(defun Man-getpage-in-background (topic) 578(defun Man-getpage-in-background (topic)
578 "Uses TOPIC to build and fire off the manpage and cleaning command." 579 "Use TOPIC to build and fire off the manpage and cleaning command."
579 (let* ((man-args topic) 580 (let* ((man-args topic)
580 (bufname (concat "*Man " man-args "*")) 581 (bufname (concat "*Man " man-args "*"))
581 (buffer (get-buffer bufname))) 582 (buffer (get-buffer bufname)))
@@ -732,7 +733,7 @@ Same for the ANSI bold and normal escape sequences."
732 733
733(defun Man-bgproc-sentinel (process msg) 734(defun Man-bgproc-sentinel (process msg)
734 "Manpage background process sentinel. 735 "Manpage background process sentinel.
735When manpage command is run asynchronously, PROCESS is the process 736When manpage command is run asynchronously, PROCESS is the process
736object for the manpage command; when manpage command is run 737object for the manpage command; when manpage command is run
737synchronously, PROCESS is the name of the buffer where the manpage 738synchronously, PROCESS is the name of the buffer where the manpage
738command is run. Second argument MSG is the exit message of the 739command is run. Second argument MSG is the exit message of the
@@ -796,7 +797,7 @@ manpage command."
796(defun Man-mode () 797(defun Man-mode ()
797 "A mode for browsing Un*x manual pages. 798 "A mode for browsing Un*x manual pages.
798 799
799The following man commands are available in the buffer. Try 800The following man commands are available in the buffer. Try
800\"\\[describe-key] <key> RET\" for more information: 801\"\\[describe-key] <key> RET\" for more information:
801 802
802\\[man] Prompt to retrieve a new manpage. 803\\[man] Prompt to retrieve a new manpage.
@@ -811,24 +812,24 @@ The following man commands are available in the buffer. Try
811\\[Man-kill] Deletes the manpage window, kill its buffer. 812\\[Man-kill] Deletes the manpage window, kill its buffer.
812\\[describe-mode] Prints this help text. 813\\[describe-mode] Prints this help text.
813 814
814The following variables may be of some use. Try 815The following variables may be of some use. Try
815\"\\[describe-variable] <variable-name> RET\" for more information: 816\"\\[describe-variable] <variable-name> RET\" for more information:
816 817
817Man-notify-method What happens when manpage formatting is done. 818`Man-notify-method' What happens when manpage formatting is done.
818Man-downcase-section-letters-flag Force section letters to lower case. 819`Man-downcase-section-letters-flag' Force section letters to lower case.
819Man-circular-pages-flag Treat multiple manpage list as circular. 820`Man-circular-pages-flag' Treat multiple manpage list as circular.
820Man-auto-section-alist List of major modes and their section numbers. 821`Man-auto-section-alist' List of major modes and their section numbers.
821Man-section-translations-alist List of section numbers and their Un*x equiv. 822`Man-section-translations-alist' List of section numbers and their Un*x equiv.
822Man-filter-list Background manpage filter command. 823`Man-filter-list' Background manpage filter command.
823Man-mode-line-format Mode line format for Man mode buffers. 824`Man-mode-line-format' Mode line format for Man mode buffers.
824Man-mode-map Keymap bindings for Man mode buffers. 825`Man-mode-map' Keymap bindings for Man mode buffers.
825Man-mode-hook Normal hook run on entry to Man mode. 826`Man-mode-hook' Normal hook run on entry to Man mode.
826Man-section-regexp Regexp describing manpage section letters. 827`Man-section-regexp' Regexp describing manpage section letters.
827Man-heading-regexp Regexp describing section headers. 828`Man-heading-regexp' Regexp describing section headers.
828Man-see-also-regexp Regexp for SEE ALSO section (or your equiv). 829`Man-see-also-regexp' Regexp for SEE ALSO section (or your equiv).
829Man-first-heading-regexp Regexp for first heading on a manpage. 830`Man-first-heading-regexp' Regexp for first heading on a manpage.
830Man-reference-regexp Regexp matching a references in SEE ALSO. 831`Man-reference-regexp' Regexp matching a references in SEE ALSO.
831Man-switches Background `man' command switches. 832`Man-switches' Background `man' command switches.
832 833
833The following key bindings are currently in effect in the buffer: 834The following key bindings are currently in effect in the buffer:
834\\{Man-mode-map}" 835\\{Man-mode-map}"
@@ -1042,7 +1043,7 @@ Actually the section moved to is described by `Man-see-also-regexp'."
1042 1043
1043(defun Man-follow-manual-reference (reference) 1044(defun Man-follow-manual-reference (reference)
1044 "Get one of the manpages referred to in the \"SEE ALSO\" section. 1045 "Get one of the manpages referred to in the \"SEE ALSO\" section.
1045Specify which reference to use; default is based on word at point." 1046Specify which REFERENCE to use; default is based on word at point."
1046 (interactive 1047 (interactive
1047 (if (not Man-refpages-alist) 1048 (if (not Man-refpages-alist)
1048 (error "There are no references in the current man page") 1049 (error "There are no references in the current man page")
@@ -1138,6 +1139,9 @@ Specify which reference to use; default is based on word at point."
1138;; Init the man package variables, if not already done. 1139;; Init the man package variables, if not already done.
1139(Man-init-defvars) 1140(Man-init-defvars)
1140 1141
1142(add-to-list 'debug-ignored-errors "^No manpage [0-9]* found$")
1143(add-to-list 'debug-ignored-errors "^Can't find the .* manpage$")
1144
1141(provide 'man) 1145(provide 'man)
1142 1146
1143;;; man.el ends here 1147;;; man.el ends here