;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Sun Sep 4 18:27:59 1994 ;;; from file /gd/gnu/emacs/19.0/lisp/man.el ;;; emacs version 19.26.1. ;;; 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 "`/gd/gnu/emacs/19.0/lisp/man.el' was compiled for Emacs 19")) (require (quote assoc)) (defvar manual-program "man" "\ The name of the program that produces man pages.") (defvar Man-notify (quote friendly) "\ *Selects the behavior when manpage is ready. This variable may have one of the following values: newframe -- put the manpage in its own frame (see `Man-frame-parameters') 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-frame-parameters nil "\ *Frame parameter list for creating a new frame for a manual page.") (defvar Man-reuse-okay-p t "\ *Reuse a manpage buffer if possible. If non-nil, 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/d'" "-e '/Reformatting entry. Wait/d'" "-e '/^ *\\([A-Za-z][A-Za-z.]*([0-9A-Za-z][-0-9A-Za-z+]*)\\).*\\1$/d'" "-e '/^[ ]*Hewlett-Packard Company[ ]*- [0-9]* -.*$/d'" "-e '/^[ ]*Hewlett-Packard[ ]*- [0-9]* -.*$/d'" "-e '/^ *- [0-9]* - *Formatted:.*[0-9]$/d'" "-e '/^[ ]*Page [0-9]*.*(printed [0-9\\/]*)$/d'" "-e '/^Printed [0-9].*[0-9]$/d'" "-e '/^[ ]*X Version 1[01].*Release [0-9]/d'" "-e '/^[A-za-z].*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 mode-line-process minor-mode-alist ")%]----" (-3 . "%p") "-%-")) "\ *Mode line format for manual mode buffer.") (defvar Man-mode-map nil "\ *Keymap for Man mode.") (defvar Man-mode-hook nil "\ *Normal hook run when Man mode is enabled.") (defvar Man-cooked-hook nil "\ *Normal hook run after removing backspaces but before Man-mode processing.") (defvar Man-section-regexp "[0-9][a-zA-Z+]*\\|[LNln]" "\ *Regular expression describing a manpage section within parentheses.") (defvar Man-heading-regexp "^[ ]*\\([A-Z][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 fo.*$" "\ *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.") (defvar Man-specified-section-option (byte-code "\n\" Çć" [string-match "-solaris[0-9.]*$" system-configuration "-s" ""] 3) "\ *Option that indicates a specified a manual section name.") (byte-code "!!!!!!\"\"\"\"\"   ! # # # # # # # # # # # # # # #ȇ" [make-variable-buffer-local Man-sections-alist Man-refpages-alist Man-page-list Man-current-page Man-page-mode-string Man-original-frame 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 Man mode."]) (defalias (quote Man-delete-trailing-newline) #[(str) "GSO˜GSO" [str nil "\n" 0] 3]) (defalias 'Man-build-man-command #[nil "\nR\f = @@ @A@ A;'<+!#R* *" [manual-program " " Man-switches " %s 2>/dev/null" 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\fWA\n #A OP  OP  \fOP-" ["" 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\f\"\f\"\fʼnSO\nQ  \f\".\fʔʕO/\f @\f!\f@@@AAa!\f|u!w\f*@\fR,\f" [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 Man-specified-section-option " "] 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) " R" [Man-specified-section-option n " " manword] 4] " "] 5 "\ Build the default man args from MANWORD and buffer's major mode."]) (defalias 'Man-default-man-entry #[nil "! xx!u`w`{!<w `w`{ R@ ! *" [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" Man-specified-section-option "0-9a-zA-Z" " " Man-default-man-args] 4 "\ 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) "  Řł \"\"!Ř. Ř+!. !\f:\"*" [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-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. Normally, if a buffer already exists for this man page, it will display immediately; either a prefix argument or a nil value to `Man-reuse-okay-p' overrides this and forces the man page to be regenerated." "P"]) (defalias 'Man-getpage-in-background #[(topic &optional override-reuse-p) " Q\f!\"\"\"!X! #\f!q )!\" \"%\")+" [topic man-args "*man " "*" bufname get-buffer buffer Man-reuse-okay-p override-reuse-p Man-notify-when-ready require env message "Invoking %s %s in background" manual-program generate-new-buffer selected-frame Man-original-frame copy-sequence process-environment setenv "TERM" "dumb" set-process-sentinel start-process "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) "q ) =q!) =7.\n!.\n!! =RL\n!L\n!! =ng\n!g\n!\" = !\" =!\"!)" [man-buffer Man-original-frame saved-frame Man-notify newframe make-frame Man-frame-parameters bully window-system frame-live-p select-frame pop-to-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 !1!<`!{x !=L !Ux !GSHUiOk)Qdb\"c*\f !݋ ! !*+" [process-buffer process nil err-mess delete-buff Man-buffer buffer-name set-process-buffer match-data match-data ((store-match-data match-data)) case-fold-search 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 nil case-fold-search Man-set-fonts run-hooks Man-cooked-hook Man-mode set-buffer-modified-p] 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-hook Normal hook run on entry to 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\fd#ǔǕ{\"y)" [nil Man-sections-alist case-fold-search re-search-forward Man-heading-regexp t aput 1] 4 "\ Build the association list of manpage sections."]) (defalias 'Man-build-references-alist #[nil " !y`!` \n\n }eb m?`U?`  #ДЕ{GS}bPHUwO}\"+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$ydb)" [nil case-fold-search looking-at Man-heading-regexp 1 re-search-forward t n 0] 5 "\ Move point to Nth next section (default 1)." "p"]) (defalias 'Man-previous-section #[(n) " ! y e$yeb)" [nil case-fold-search looking-at Man-heading-regexp -1 re-search-backward t n 0] 5 "\ Move point to Nth previous section (default 1)." "p"]) (defalias 'Man-find-section #[(section) "`eb Pd#yƂ\nb*" [nil case-fold-search curpos re-search-forward "^[ ]*" section t 0] 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 reference) "!\f\"!!\"" [Man-refpages-alist error "No references found in current manpage" aput reference Man-getpage-in-background Man-translate-references aheadsym arg] 4 "\ Get one of the manpages referred to in the \"SEE ALSO\" section. Specify which reference to use; default is based on word at point. Prefix argument ARG is passed to `Man-getpage-in-background'." (byte-code "! Ċ!w \n\n\"(\n͉O*\n*\"@4!Q$T֘Y[+D" [Man-refpages-alist error "No references in current man page" current-prefix-arg all-completions skip-syntax-backward "w()" " " nil current-word word string-match "-$" 0 aheadsym default chosen "Refer to: (default " ") " prompt completing-read t ""] 7)]) (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 "GU !G\"!C" [Man-page-list 1 error "You're looking at the only manpage in the buffer." read-minibuffer format "Go to manpage [1-%d]: "] 4)]) (defalias 'Man-next-manpage #[nil "GU !\fGW\fT! !!" [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 !\fV\fS! 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))