diff options
author | Francesco Potortì <pot@gnu.org> | 1994-10-06 10:28:26 +0000 |
---|---|---|
committer | Francesco Potortì <pot@gnu.org> | 1994-10-06 10:28:26 +0000 |
commit | b1d139767be9e0ed70793cb48c4b77907641b3c1 (patch) | |
tree | 89fc71c1cea7caff3b6290016aee7657f0520cf0 /lisp/man.el | |
parent | 2a5928302da377cf54276b9e7c978b7daf7723c5 (diff) | |
download | emacs-b1d139767be9e0ed70793cb48c4b77907641b3c1.tar.gz |
* man.el (Man-notify, Man-current-page, Man-page-list,
Man-filter-list, Man-original-frame, Man-arguments,
Man-fontify-manpage-flag, Man-sections-alist, Man-refpages-alist,
Man-uses-untabify-flag, Man-page-mode-string, Man-sed-script):
Added defvar's to keep the compiler quiet.
(Man-getpage-in-background): Start buffer name with "*Man ".
instead of "*man " to avoid conflict with "*mail*".
(Man-match-substring): Defsubst moved before first call.
(Man-build-page-list, Man-strip-page-headers, Man-unindent): Use
defun instead of defsubst, for code clarity purpose.
Diffstat (limited to 'lisp/man.el')
-rw-r--r-- | lisp/man.el | 51 |
1 files changed, 34 insertions, 17 deletions
diff --git a/lisp/man.el b/lisp/man.el index 919d1ad9e2d..40629865bd2 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -3,8 +3,8 @@ ;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. ;; Author: Barry A. Warsaw <bwarsaw@cen.com> -;; Last-Modified: $Date: 1994/09/29 12:42:45 $ -;; Version: $Revision: 1.50 $ +;; Last-Modified: $Date: 1994/10/01 13:27:15 $ +;; Version: $Revision: 1.51 $ ;; Keywords: help ;; Adapted-By: ESR, pot @@ -92,11 +92,28 @@ ;; be led to believe that the manpages in the missing directories do ;; not exist. + ;;; Code: (require 'assoc) ;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv +;; empty defvars (keep the compiler quiet) + +(defvar Man-notify) +(defvar Man-current-page) +(defvar Man-page-list) +(defvar Man-filter-list) +(defvar Man-original-frame) +(defvar Man-arguments) +(defvar Man-fontify-manpage-flag) +(defvar Man-sections-alist) +(defvar Man-refpages-alist) +(defvar Man-uses-untabify-flag) +(defvar Man-page-mode-string) +(defvar Man-sed-script) + +;; vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv ;; user variables (defvar manual-program "man" @@ -307,7 +324,7 @@ This is necessary if one wants to dump man.el with emacs." ;; Man-untabify-command nil nil nil ;; (append Man-untabify-command-args ;; (list "/etc/passwd"))))) - "Use `untabify', because Man-untabify-command cannot do that.") + "When non-nil use `untabify' instead of Man-untabify-command.") (defconst Man-sed-script (cond @@ -373,6 +390,16 @@ commands appear in the association list. The final output is placed in the manpage buffer.") ) +(defsubst Man-match-substring (&optional n string) + "Return the substring matched by the last search. +Optional arg N means return the substring matched by the Nth paren +grouping. Optional second arg STRING means return a substring from +that string instead of from the current buffer." + (if (null n) (setq n 0)) + (if string + (substring string (match-beginning n) (match-end n)) + (buffer-substring (match-beginning n) (match-end n)))) + (defsubst Man-make-page-mode-string () "Formats part of the mode line for Man mode." (format "%s page %d of %d" @@ -433,16 +460,6 @@ and the Man-section-translations-alist variables)." slist nil)))) (concat Man-specified-section-option section " " name)))) -(defsubst Man-match-substring (&optional n string) - "Return the substring matched by the last search. -Optional arg N means return the substring matched by the Nth paren -grouping. Optinal second arg STRING means return a substring from -that string instead of from the current buffer." - (if (null n) (setq n 0)) - (if string - (substring string (match-beginning n) (match-end n)) - (buffer-substring (match-beginning n) (match-end n)))) - ;; ====================================================================== ;; default man entry: get word under point @@ -526,7 +543,7 @@ Optional OVERRIDE-REUSE-P, when non-nil, means to start a background process even if a buffer already exists and `Man-reuse-okay-flag' is non-nil." (let* ((man-args topic) - (bufname (concat "*man " man-args "*")) + (bufname (concat "*Man " man-args "*")) (buffer (get-buffer bufname))) (if (and Man-reuse-okay-flag (not override-reuse-p) @@ -798,7 +815,7 @@ The following key bindings are currently in effect in the buffer: (aput 'Man-refpages-alist word)))) (skip-chars-forward " \t\n,"))))))) -(defsubst Man-build-page-list () +(defun Man-build-page-list () "Build the list of separate manpages in the buffer." (setq Man-page-list nil) (let ((page-start (point-min)) @@ -830,7 +847,7 @@ The following key bindings are currently in effect in the buffer: (setq page-start page-end) ))) -(defsubst Man-strip-page-headers () +(defun Man-strip-page-headers () "Strip all the page headers but the first from the manpage." (let ((buffer-read-only nil) (case-fold-search nil) @@ -855,7 +872,7 @@ The following key bindings are currently in effect in the buffer: (replace-match ""))) (setq page-list (cdr page-list))))) -(defsubst Man-unindent () +(defun Man-unindent () "Delete the leading spaces that indent the manpage." (let ((buffer-read-only nil) (case-fold-search nil) |