Mercurial > emacs
changeset 9354:1ce43418547c
* 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.
author | Francesco Potortì <pot@gnu.org> |
---|---|
date | Thu, 06 Oct 1994 10:28:26 +0000 |
parents | 30659ed71a1b |
children | 8ac258bc59ef |
files | lisp/man.el |
diffstat | 1 files changed, 34 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/man.el Thu Oct 06 07:08:03 1994 +0000 +++ b/lisp/man.el Thu Oct 06 10:28:26 1994 +0000 @@ -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 @@ ;; 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 @@ 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 @@ 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 @@ 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 @@ (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 @@ (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 @@ (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)