;ELC ;;; compiled by rms@mole.gnu.ai.mit.edu on Tue Aug 3 14:52:34 1993 ;;; from file /home/fsf/rms/e19/lisp/man.el ;;; emacs version 19.17.5. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19")) (require (quote assoc)) (defvar Man-notify (quote friendly) "\ *Selects the behavior when manpage is ready. This variable may have one of the following values: bully -- make the manpage the current buffer and only window aggressive -- make the manpage the current buffer in the other window friendly -- display manpage in other window but don't make current polite -- don't display manpage, but prints message when ready (beeps) quiet -- like `polite', but don't beep meek -- make no indication that manpage is ready Any other value of `Man-notify' is equivalent to `meek'.") (defvar Man-reuse-okay-p t "\ *Reuse a manpage buffer if possible. When t, and a manpage buffer already exists with the same invocation, man just indicates the manpage is ready according to the value of `Man-notify'. When nil, it always fires off a background process, putting the results in a uniquely named buffer.") (defvar Man-downcase-section-letters-p t "\ *Letters in sections are converted to lower case. Some Un*x man commands can't handle uppercase letters in sections, for example \"man 2V chmod\", but they are often displayed in the manpage with the upper case letter. When this variable is t, the section letter (e.g., \"2V\") is converted to lowercase (e.g., \"2v\") before being sent to the man background process.") (defvar Man-circular-pages-p t "\ *If t, the manpage list is treated as circular for traversal.") (defvar Man-auto-section-alist nil "\ *Association list of major modes and their default section numbers. List is of the form: (MAJOR-MODE . [SECTION | (SECTION*)]). If current major mode is not in list, then the default is to check for manpages in all sections.") (defvar Man-section-translations-alist (quote (("3C++" . "3") ("3X" . "3") ("3X11" . "3") ("1-UCB" . ""))) "\ *Association list of bogus sections to real section numbers. Some manpages (e.g. the Sun C++ 2.1 manpages) have section numbers in their references which Un*x `man' does not recognize. This association list is used to translate those sections, when found, to the associated section number.") (defvar Man-filter-list (quote (("sed " ("-e '/[Nn]o such file or directory/d'" "-e '/Reformatting page. Wait... done/d'" "-e '/^\\([A-Z][A-Z.]*([0-9A-Za-z][-0-9A-Za-z+]*)\\).*\\1$/d'" "-e '/^[ \\t]*Hewlett-Packard Company[ \\t]*- [0-9]* -.*$/d'" "-e '/^[ \\t]*Hewlett-Packard[ \\t]*- [0-9]* -.*$/d'" "-e '/^ *Page [0-9]*.*(printed [0-9\\/]*)$/d'" "-e '/^Printed [0-9].*[0-9]$/d'" "-e '/^[ \\t]*X Version 1[01].*Release [0-9]/d'" "-e '/^Sun Microsystems.*Last change:/d'" "-e '/^Sun Release [0-9].*[0-9]$/d'" "-e '/^\\n$/D'")) ("awk '\n" ("BEGIN { blankline=0; anonblank=0; }\n" "/^$/ { if (anonblank==0) next; }\n" "{ anonblank=1; }\n" "/^$/ { blankline++; next; }\n" "{ if (blankline>0) { print \"\"; blankline=0; } print $0; }\n" "'")))) "\ *Manpage cleaning filter command phrases. This variable contains an association list of the following form: '((command-string (phrase-string*))*) Each phrase-string is concatenated onto the command-string to form a command filter. The (standard) output (and standard error) of the Un*x man command is piped through each command filter in the order the commands appear in the association list. The final output is placed in the manpage buffer.") (defvar Man-mode-line-format (quote ("" mode-line-modified mode-line-buffer-identification " " global-mode-string " " Man-page-mode-string " %[(" mode-name minor-mode-alist mode-line-process ")%]----" (-3 . "%p") "-%-")) "\ *Mode line format for manual mode buffer.") (defvar Man-mode-map nil "\ *Keymap for Man mode.") (defvar Man-mode-hooks nil "\ *Hooks for Man mode.") (defvar Man-section-regexp "[0-9][a-zA-Z+]*" "\ *Regular expression describing a manpage section within parentheses.") (defvar Man-heading-regexp "^ ?[A-Z]" "\ *Regular expression describing a manpage heading entry.") (defvar Man-see-also-regexp "SEE ALSO" "\ *Regular expression for SEE ALSO heading (or your equivalent). This regexp should not start with a `^' character.") (defvar Man-first-heading-regexp "^ ?NAME$\\|^ ?No manual entry for .*$" "\ *Regular expression describing first heading on a manpage. This regular expression should start with a `^' character.") (defvar Man-reference-regexp "[-a-zA-Z0-9_][-a-zA-Z0-9_.]*\\(([0-9][a-zA-Z+]*)\\)?" "\ *Regular expression describing a reference in the SEE ALSO section.") (defvar Man-switches "" "\ *Switches passed to the man command, as a single string.") (byte-code "!!!!!\"\"\"\"\"\n \n\n!\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#\n#LJ" [make-variable-buffer-local Man-sections-alist Man-refpages-alist Man-page-list Man-current-page Man-page-mode-string set-default nil 0 "1 (of 1)" Man-mode-map make-keymap suppress-keymap define-key " " scroll-up "" scroll-down "n" Man-next-section "p" Man-previous-section "n" Man-next-manpage "p" Man-previous-manpage "," beginning-of-buffer "." end-of-buffer "r" Man-follow-manual-reference "t" toggle-truncate-lines "g" Man-goto-section "s" Man-goto-see-also-section "q" Man-quit "m" manual-entry "?" describe-mode] 4) (defalias 'Man-page-mode-string #[nil "\n G#" [format "%d (of %d)" Man-current-page Man-page-list] 4 "\ Formats part of the mode line for manual mode."]) (defalias (quote Man-delete-trailing-newline) #[(str) "GSO˜GSO" [str nil "\n" 0] 3]) (defalias 'Man-build-man-command #[nil " Q  9 @@ @A@ A;%<)! #R* *" ["man " Man-switches " %s 2>&1" Man-filter-list flist command pargs pcom error "malformed Man-filter-list." " | " mapconcat (lambda (phrase) phrase) " "] 7 "\ Builds the entire background manpage and cleaning command."]) (defalias 'Man-downcase #[(man-args) "‰ G WA\n #A OP  OP   OP-" ["" 0 nil man-args len mend mstart s newargs string-match Man-section-regexp] 6 "\ Downcases section letters in MAN-ARGS."]) (defalias 'Man-translate-references #[(ref) "\nQ \" \" ʼnSO\nQ  \". ʔʕO/  @ ! @@@AAa! |u!w *@ Q, " [string-match "(" Man-section-regexp ")$" ref 0 word "(\\(" "\\))" section-re 1 "" section Man-section-translations-alist slist Man-downcase-section-letters-p Man-downcase s2 s1 nil " "] 4 "\ Translates REF from \"chmod(2V)\" to \"2v chmod\" style."]) (defalias 'Man-linepos #[(&optional position col-p) "` =y7 = 7 =(eb7 =4db7\n@iA`\nb *" [nil rval tpnt position bol 0 boi back-to-indentation bob eob col-p] 2 "\ Return the character position at various line/buffer positions. Preserves the state of point, mark, etc. Optional arg POSITION can be one of the following symbols: bol == beginning of line boi == beginning of indentation eol == end of line [default] bob == beginning of buffer eob == end of buffer Optional arg COL-P, if non-nil, means to return the current column instead of character position."]) (defalias 'Man-default-man-args #[(manword) " A \n:\n#\n Q)" [major-mode Man-auto-section-alist sections manword mapconcat #[(n) "\nQ" [n " " manword] 3] " "] 5 "\ Build the default man args from MANWORD and buffer's major mode."]) (defalias 'Man-default-man-entry #[nil "! xx!u`w`{!:w`w`{ Q> ! *" [nil default-title looking-at "[a-zA-Z_]" "^a-zA-Z_" "(a-zA-Z_0-9" "(" 1 "a-zA-Z0-9_" "[ ]*([ ]*[0-9][a-zA-Z]?[ ]*)" "^0-9" "0-9a-zA-Z" " " Man-default-man-args] 3 "\ Make a guess at a default manual entry. This guess is based on the text surrounding the cursor, and the default section number is selected from `Man-auto-section-alist'."]) (defalias (quote man) (quote manual-entry)) (defalias 'manual-entry #[(arg) "  Řł \"\"!Ř. Ř+!. ! ?!:\"*" [Man-default-man-entry default-entry read-string format "Manual-entry: %s" "" "(default: %s) " man-args error "No man args given." Man-translate-references Man-downcase-section-letters-p Man-downcase Man-getpage-in-background arg] 7 "\ Get a Un*x manual page and put it in a buffer. This command is the top-level command in the man package. It runs a Un*x command to retrieve and clean a manpage in the background and places the results in a Man mode (manpage browsing) buffer. See variable `Man-notify' for what happens when the buffer is ready. Universal argument ARG, is passed to `Man-getpage-in-background'." "P"]) (defalias 'Man-getpage-in-background #[(TOPIC &optional override-reuse-p) " Q !\"\"\"!G \" !!\" \"%\")+" [TOPIC man-args "*man " "*" bufname get-buffer buffer Man-reuse-okay-p override-reuse-p Man-notify-when-ready message "Invoking man %s in background..." generate-new-buffer copy-sequence process-environment setenv "TERM" "dumb" set-process-sentinel start-process "man" "sh" "-c" format Man-build-man-command Man-bgproc-sentinel] 9 "\ Uses TOPIC to build and fire off the manpage and cleaning command. Optional OVERRIDE-REUSE-P, when non-nil, means to start a background process even if a buffer already exists and `Man-reuse-okay-p' is non-nil."]) (defalias 'Man-notify-when-ready #[(man-buffer) "= ! = !=\" \"=2 !\"=? !\"!" [Man-notify bully pop-to-buffer man-buffer delete-other-windows aggressive friendly display-buffer not-this-window polite beep message "Manual buffer %s is ready." buffer-name quiet ""] 4 "\ Notify the user when MAN-BUFFER is ready. See the variable `Man-notify' for the different notification behaviors."]) (defalias (quote Man-set-fonts) #[nil "eb#NĔĕb7 dU' ) T!4̂5$` WJ!J!7*" [re-search-forward "\\(.\\)+" nil t 0 en st window-system put-text-property face looking-at "_" underline bold "." replace-match ""] 7]) (defalias 'Man-bgproc-sentinel #[(process msg) " !‰ ! \" qeb!(!3`!{o !=C !Uo !GSHU`Ob)Qdb\"c) { !ً ! !+" [process-buffer process nil err-mess delete-buff Man-buffer buffer-name set-process-buffer looking-at "No \\(manual \\)*entry for" "[^\n]*: nothing appropriate$" Man-linepos eol t process-status exit process-exit-status 0 ": process " msg eos 10 format "\nprocess %s" kill-buffer ((byte-code "q !)ć" [Man-buffer Man-set-fonts Man-mode set-buffer-modified-p nil] 2)) Man-notify-when-ready error] 5 "\ Manpage background process sentinel."]) (defalias 'Man-mode #[nil " \np!!!eb !!" [Man-mode major-mode "Man" mode-name nil buffer-auto-save-file-name Man-mode-line-format mode-line-format t truncate-lines buffer-read-only buffer-disable-undo auto-fill-mode -1 use-local-map Man-mode-map Man-build-page-list Man-goto-page 1 run-hooks Man-mode-hook] 2 "\ A mode for browsing Un*x manual pages. The following man commands are available in the buffer. Try \"\\[describe-key] RET\" for more information: \\[manual-entry] Prompt to retrieve a new manpage. \\[Man-follow-manual-reference] Retrieve reference in SEE ALSO section. \\[Man-next-manpage] Jump to next manpage in circular list. \\[Man-previous-manpage] Jump to previous manpage in circular list. \\[Man-next-section] Jump to next manpage section. \\[Man-previous-section] Jump to previous manpage section. \\[Man-goto-section] Go to a manpage section. \\[Man-goto-see-also-section] Jumps to the SEE ALSO manpage section. \\[Man-quit] Deletes the manpage, its buffer, and window. \\[describe-mode] Prints this help text. The following variables may be of some use. Try \"\\[describe-variable] RET\" for more information: Man-notify What happens when manpage formatting is done. Man-reuse-okay-p Okay to reuse already formatted buffer? Man-downcase-section-letters-p Force section letters to lower case? Man-circular-pages-p Multiple manpage list treated as circular? Man-auto-section-alist List of major modes and their section numbers. Man-section-translations-alist List of section numbers and their Un*x equiv. Man-filter-list Background manpage filter command. Man-mode-line-format Mode line format for Man-mode buffers. Man-mode-map Keymap bindings for Man-mode buffers. Man-mode-hooks Hooks for Man-mode. Man-section-regexp Regexp describing manpage section letters. Man-heading-regexp Regexp describing section headers. Man-see-also-regexp Regexp for SEE ALSO section (or your equiv). Man-first-heading-regexp Regexp for first heading on a manpage. Man-reference-regexp Regexp matching a references in SEE ALSO. Man-switches Background `man' command switches. The following key bindings are currently in effect in the buffer: \\{Man-mode-map}" nil]) (defalias 'Man-build-section-alist #[nil "eb d#! {\"y" [nil Man-sections-alist re-search-forward Man-heading-regexp t aput Man-linepos bol 1] 4 "\ Build the association list of manpage sections."]) (defalias 'Man-build-references-alist #[nil " !y`!` \n }eb m?`U?`  #ДЕ{GS{`PHUuO{\"+w',)" [nil Man-refpages-alist Man-find-section Man-see-also-regexp 1 Man-next-section -1 runningpoint hyphenated end start back-to-indentation re-search-forward Man-reference-regexp t eow 0 word len 45 aput " \n,"] 5 "\ Build the association list of references (in the SEE ALSO section)."]) (defalias 'Man-build-page-list #[nil "!! ebd#m?Jd#3!9db` BC\"," [nil Man-page-list Man-linepos bob eob Man-first-heading-regexp regexp page-end page-start re-search-forward t bol append] 4 "\ Build the list of separate manpages in the buffer."]) (defalias 'Man-next-section #[(n) " ! y d $yLJdb" [looking-at Man-heading-regexp 1 re-search-forward t n 0 nil] 5 "\ Move point to Nth next section (default 1)." "p"]) (defalias 'Man-previous-section #[(n) " ! y e $yLJeb" [looking-at Man-heading-regexp -1 re-search-backward t n 0 nil] 5 "\ Move point to Nth previous section (default 1)." "p"]) (defalias 'Man-find-section #[(section) "`eb Pd#yĂb)" [curpos re-search-forward "^\\s-?" section t 0 nil] 4 "\ Move point to SECTION if it exists, otherwise don't move point. Returns t if section is found, nil otherwise."]) (defalias 'Man-goto-section #[nil " ! Q\n\n \"#̘' ),\" !!" [aput Man-sections-alist aheadsym default t completion-ignore-case nil chosen "Go to section: (default " ") " prompt completing-read "" Man-find-section] 6 "\ Query for section to move point to." nil]) (defalias 'Man-goto-see-also-section #[nil " !? Q!" [Man-find-section Man-see-also-regexp error "No " " section found in current manpage."] 4 "\ Move point the the \"SEE ALSO\" section. Actually the section moved to is described by `Man-see-also-regexp'." nil]) (defalias 'Man-follow-manual-reference #[(arg) "\n°!! Q\n\n$-͘1 3+\"!!:\"" [Man-refpages-alist error "No references found in current manpage." aput aheadsym default nil chosen "Refer to: (default " ") " prompt completing-read t "" Man-getpage-in-background Man-translate-references arg] 8 "\ Get one of the manpages referred to in the \"SEE ALSO\" section. Queries you for the page to retrieve. Of course it does this in the background. Universal argument ARG is passed to `Man-getpage-in-background'." "P"]) (defalias 'Man-quit #[nil "p!!)" [buff delete-windows-on kill-buffer] 2 "\ Kill the buffer containing the manpage." nil]) (defalias 'Man-goto-page #[(page) "W \nGV\"S\n8@ A  ~b} ͏~}eb+" [page 1 Man-page-list error "No manpage %d found" page-range page-start page-end Man-current-page Man-page-mode-string Man-build-section-alist nil (Man-build-references-alist) ((error))] 4 "\ Go to the manual page on page PAGE." (byte-code "!G\"" [Man-page-list error "You're looking at the only manpage in the buffer." format "nGo to manpage [1-%d]: "] 3)]) (defalias 'Man-next-manpage #[nil "GU ! GW T! !!" [Man-page-list 1 error "This is the only manpage in the buffer." Man-current-page Man-goto-page Man-circular-pages-p "You're looking at the last manpage in the buffer."] 2 "\ Find the next manpage entry in the buffer." nil]) (defalias 'Man-previous-manpage #[nil "GU ! V S! G!!" [Man-page-list 1 error "This is the only manpage in the buffer." Man-current-page Man-goto-page Man-circular-pages-p "You're looking at the first manpage in the buffer."] 2 "\ Find the previous manpage entry in the buffer." nil]) (provide (quote man))