;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:20:50 2007 ;;; from file /home/cyd/emacs/lisp/help-mode.el ;;; in Emacs version 22.0.99 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. (if (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.29"))) (error "`help-mode.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\207" [require button view] 2) #@23 Keymap for help mode. (defvar help-mode-map (make-sparse-keymap) (#$ . 630)) (byte-code "\302 \"\210\303\304\305#\210\303\306\307#\210\303\310\311#\210\303\312\313#\207" [help-mode-map button-buffer-map set-keymap-parent define-key [mouse-2] help-follow-mouse "" help-go-back "" help-follow-symbol " " help-follow] 4) #@239 A stack of ways by which to return to help buffers after following xrefs. Used by `help-follow' and `help-xref-go-back'. An element looks like (POSITION FUNCTION ARGS...). To use the element, do (apply FUNCTION ARGS) then goto the point. (defvar help-xref-stack nil (#$ . 964)) (byte-code "\300\301\302\303#\210\304\301!\207" [put help-xref-stack permanent-local t make-variable-buffer-local] 4) #@108 An item for `help-follow' in this buffer to push onto `help-xref-stack'. The format is (FUNCTION ARGS...). (defvar help-xref-stack-item nil (#$ . 1367)) (byte-code "\300\301\302\303#\210\304\301!\210\305\306\307\"\210\305\301\307\"\207" [put help-xref-stack-item permanent-local t make-variable-buffer-local set-default help-xref-stack nil] 4) #@26 Hook run by `help-mode'. (custom-declare-variable 'help-mode-hook 'nil '(#$ . 1717) :type 'hook :group 'help) (define-button-type 'help-xref 'follow-link t 'action 'help-button-action) #@30 Call BUTTON's help function. (defalias 'help-button-action #[(button) "\301\302!\303\304\"\303\305\"#\207" [button help-do-xref button-start button-get help-function help-args] 6 (#$ . 1908)]) (byte-code "\300\301\302\303\301\304\305\306\307!&\210\300\310\302\303\301\311\305\306\312!&\210\300\313\302\303\301\314\305\306\315!&\210\300\316\302\303\301\317\305\306\320!&\210\300\321\302\303\301\322\305\306\323!&\210\300\324\302\303\301\325\305\306\326!&\210\300\327\302\303\301\330\305\306\331!&\210\300\332\302\303\301\333\305\306\334!&\210\300\335\302\303\301\336\305\306\337!&\210\300\340\302\303\301\341\305\306\342!&\210\300\343\302\303\301\344\305\306\345!&\210\300\346\302\303\301\347\305\306\350!&\210\300\351\302\303\301\352\305\306\353!&\210\300\354\302\303\301\355\305\306\356!&\210\300\357\302\303\301\360\305\306\361!&\207" [define-button-type help-function :supertype help-xref describe-function help-echo purecopy "mouse-2, RET: describe this function" help-variable describe-variable "mouse-2, RET: describe this variable" help-face describe-face "mouse-2, RET: describe this face" help-coding-system describe-coding-system "mouse-2, RET: describe this coding system" help-input-method describe-input-method "mouse-2, RET: describe this input method" help-character-set describe-character-set "mouse-2, RET: describe this character set" help-symbol help-xref-interned "mouse-2, RET: describe this symbol" help-back help-xref-go-back "mouse-2, RET: go back to previous help buffer" help-info info "mouse-2, RET: read this Info node" help-url browse-url "mouse-2, RET: view this URL in a browser" help-customize-variable #[(v) "\301!\207" [v customize-variable] 2] "mouse-2, RET: customize variable" help-customize-face #[(v) "\301!\207" [v customize-face] 2] "mouse-2, RET: customize face" help-function-def #[(fun file) "\303\304!\210\305=\203\306\307 !\301\"\310 \311#\312\n@!\210\nA\203'\nAb\202*\313\314!)\207" [file fun location require find-func C-source help-C-file-name indirect-function find-function-search-for-symbol nil pop-to-buffer message "Unable to find location in file"] 4] "mouse-2, RET: find function's definition" help-variable-def #[(var &optional file) "\303=\203 \304 \301\"\305 \"\306\n@!\210\nA\203 \nAb\202#\307\310!)\207" [file var location C-source help-C-file-name find-variable-noselect pop-to-buffer message "Unable to find location in file"] 3] "mouse-2, RET: find variable's definition" help-face-def #[(fun file) "\303\304!\210\305\306 #\307\n@!\210\nA\203\nAb\202\310\311!)\207" [fun file location require find-func find-function-search-for-symbol defface pop-to-buffer message "Unable to find location in file"] 4] "mouse-2, RET: find face's definition"] 9) #@152 Major mode for viewing help text and navigating references in it. Entry to this mode runs the normal hook `help-mode-hook'. Commands: \{help-mode-map} (defalias 'help-mode #[nil "\305 \210\306!\210\307\310\311 \210\312\303!\210\313\314\315\316!\207" [help-mode-map mode-name major-mode view-no-disable-on-exit view-exit-action kill-all-local-variables use-local-map "Help" help-mode view-mode make-local-variable t #[(buffer) "\300\301 !\206\302\303!\206\304 \207" [window-minibuffer-p selected-window one-window-p t delete-window] 2] run-mode-hooks help-mode-hook] 2 (#$ . 4666) nil]) (defalias 'help-mode-setup #[nil "\301 \210\302\211\207" [buffer-read-only help-mode nil] 2]) (defalias 'help-mode-finish #[nil "\304 \236\211\204\304 \nBB) \305=\205\306\307!\210\310p!\207" [view-return-to-alist entry help-return-method major-mode selected-window help-mode toggle-read-only 1 help-make-xrefs] 3]) #@62 Label to use by `help-make-xrefs' for the go-back reference. (defvar help-back-label (purecopy "[back]") (#$ . 5591)) #@180 Regexp matching doc string references to symbols. The words preceding the quoted symbol can be used in doc strings to distinguish references to variables, functions and symbols. (defconst help-xref-symbol-regexp (purecopy "\\(\\<\\(\\(variable\\|option\\)\\|\\(function\\|command\\)\\|\\(face\\)\\|\\(symbol\\|program\\|property\\)\\|\\(source \\(?:code \\)?\\(?:of\\|for\\)\\)\\)[ \n]+\\)?`\\(\\sw\\(\\sw\\|\\s_\\)+\\)'") (#$ . 5716)) #@236 Regexp matching doc string references to MULE-related keywords. It is usually nil, and is temporarily bound to an appropriate regexp when help commands related to multilingual environment (e.g., `describe-coding-system') are invoked. (defvar help-xref-mule-regexp nil (#$ . 6161)) #@56 Regexp matching doc string references to an Info node. (defconst help-xref-info-regexp (purecopy "\\<[Ii]nfo[ \n]+\\(node\\|anchor\\)[ \n]+`\\([^']+\\)'") (#$ . 6449)) #@49 Regexp matching doc string references to a URL. (defconst help-xref-url-regexp (purecopy "\\<[Uu][Rr][Ll][ \n]+`\\([^']+\\)'") (#$ . 6625)) #@512 Invoked from commands using the "*Help*" buffer to install some xref info. ITEM is a (FUNCTION . ARGS) pair appropriate for recreating the help buffer after following a reference. INTERACTIVE-P is non-nil if the calling command was invoked interactively. In this case the stack of items for help buffer "back" buttons is cleared. This should be called very early, before the output buffer is cleared, because we want to record the "previous" position of point so we can restore it properly when going back. (defalias 'help-setup-xref #[(item interactive-p) "r\305 q\210\203`B B\n\203 \306 \233\211\203 \307\241\210)\f\211)\207" [help-xref-stack-item help-xref-stack interactive-p tail item help-buffer 10 nil] 3 (#$ . 6773)]) #@48 Non-nil when following a help cross-reference. (defvar help-xref-following nil (#$ . 7519)) (defalias 'help-buffer #[nil "\301\203 p\202\f\302\303!!\207" [help-xref-following buffer-name get-buffer-create "*Help*"] 3]) #@53 Replacement keymap for `view-mode' in help buffers. (defvar help-xref-override-view-map (byte-code "\302 \303 \"\210\304\305\306#\210)\207" [map view-mode-map make-sparse-keymap set-keymap-parent define-key " " nil] 4) (#$ . 7747)) #@948 Parse and hyperlink documentation cross-references in the given BUFFER. Find cross-reference information in a buffer and activate such cross references for selection with `help-follow'. Cross-references have the canonical form `...' and the type of reference may be disambiguated by the preceding word(s) used in `help-xref-symbol-regexp'. Faces only get cross-referenced if preceded or followed by the word `face'. Variables without variable documentation do not get cross-referenced, unless preceded by the word `variable' or `option'. If the variable `help-xref-mule-regexp' is non-nil, find also cross-reference information related to multilingual environment (e.g., coding-systems). This variable is also used to disambiguate the type of reference as the same way as `help-xref-symbol-regexp'. A special reference `back' is made to return back through a stack of help buffers. Variable `help-back-label' specifies the text for that. (defalias 'help-make-xrefs #[(&optional buffer) "\212\206pq\210eb\210\306 \210\307 \310 \311\211\312 !\210\313\216\212\314@\315\311#\203M\316\317!A\320 B\321\216\322\323A\"\204A\324APA*\325\317\326A#\210)\202)\212\314C\315\311#\203h\316\327!A\325\327\330A#\210)\202O)D\2033\212\314D\315\311#\2032\316\331!A\332A!E\316\333!\203\237E\203.\334E!\203.\325\335\336E#\210\202.\316\337!\203\270\340AF\"\203.\325\331\341A#\210\202.\316\342!\204\304\316\335!\203\346E\203.E\211G9\205\330\343G\344N!)\203.\325\331\345E#\210\202.\340AF\"\203\371\325\331\345A#\210\202.E\203\334E!\203\325\331\336E#\210\202.E\203.E\211G9\205#\343G\344N!)\203.\325\331\345E#\210*\202o)\212\314H\315\311#\203$\316\346!A\332A!\211E\203 \316\333!\203j\347E!\204`E\350N\203 \325\346\351E#\210\202 \316\337!\203\201\352E!\203 \325\346\353E#\210\202 \316\342!\203\230\354E!\203 \325\346\355E#\210\202 \316\335!\204 \316\331!\203\256\325\346\356E#\210\202 \354E!\203\314\320 B\357\216\360\361!*\203\314\325\346\355E#\210\202 \347E!\204\332E\350N\203\353\352E!\203\353\325\346\362E#\210\202 \347E!\204\371E\350N\203\363E\350\"\204\315\364\365\217\203\325\346\351E#\210\202 \352E!\203 \325\346\353E#\210*\2024)\212\314\366\315\311#\203G\332\316\327!!E\352E!\203C\325\327\353E#\210)\202&)\212eb\210\314\367\315\311#\203\240\327\225\327\224ZIm\204\234\360\370!\204\234l\203l\315y\210\315\210\371\315x\210iIY\203\226\360\372!\203\226\332\316\373!!E\352E!\203\225\325\373\353E#\210)\315y\210\202[)\202L*db\210o\204\263n\203\263\374\375!\210\202\244\376c\210J\203\312\376c\210\377K\201Np#\210\376c\210+\201O\201M!\210\201PLBCM\201Q !*\207" [buffer old-modified inhibit-read-only case-fold-search stab emacs-lisp-mode-syntax-table forward-paragraph buffer-modified-p syntax-table t set-syntax-table ((set-syntax-table stab)) re-search-forward nil match-string 2 match-data ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) string-match "^([^)]+)" "(emacs)" help-xref-button help-info 1 help-url 7 intern-soft 3 coding-system-p 6 help-coding-system 4 assoc help-input-method 5 vectorp charset help-character-set 8 boundp variable-documentation help-variable fboundp help-function facep help-face help-function-def ((byte-code "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) looking-at "[ \n]+face\\W" help-symbol documentation-property (byte-code "\301\302!\303\"\207" [sym documentation-property indirect-variable variable-documentation] 3) ((cyclic-variable-indirection)) "\\\204C\321!\203G\311\202X\205X\322!\204W\323N\205X\324\211\203c\325\305 #\210*\305\225b\210\202\305u\210\202\207" [sym type looking-at "\"" forward-sexp 1 "#<" search-forward ">" nil move "\\(\\(\\sw\\|\\s_\\)+\\)" intern-soft match-string fboundp help-function (t nil) keywordp boundp variable-documentation help-variable help-xref-button] 5) ((error))] 3 (#$ . 12959)]) #@159 Follow a hyperlink which appeared to be an arbitrary interned SYMBOL. Both variable, function and face documentation are extracted into a single help buffer. (defalias 'help-xref-interned #[(symbol) "r\306 q\210\307\310\211\"\210\311!\205\310\312!\313!\205 \310\314!\315!\204,\316N\2051\310\317!\n\203\203 \204@\f\205\251eb\210\320 \203` \321\261\210\f\203`\322\323\324\"\321\325!\326\327\321\261\210\f\203i\f\321\261\210\322\323\324\"\321\325!\326\330\321\261\210)\310\307\331D\310\"\202\251 \205\251\f\205\251db\210\320\321\322\323\324\"\321\325!\326\327\321\f\261\210)\310\307\331D\310\",\207" [symbol help-xref-stack-item sdoc fdoc facedoc inhibit-read-only help-buffer help-setup-xref nil facep describe-face fboundp describe-function boundp variable-documentation describe-variable t "\n\n" make-string 30 45 symbol-name " is also a " "face." "variable." help-xref-interned] 8 (#$ . 13866)]) #@76 From BUFFER, go back to previous help buffer text using `help-xref-stack'. (defalias 'help-xref-go-back #[(buffer) "\306\211\211\211r\fq\210 \203, \211A@\306\n @ \211 A@) \211 AA))\307 \"\210r\fq\210\310\f!\203E\311\310\f!\n\"\202G\nb-\207" [args method position item buffer help-xref-stack nil apply get-buffer-window set-window-point help-xref-stack-item x] 5 (#$ . 14811)]) #@48 Go back to previous topic in this help buffer. (defalias 'help-go-back #[nil "\203\301p!\207\302\303!\207" [help-xref-stack help-xref-go-back error "No previous help buffer"] 2 (#$ . 15210) nil]) #@154 Call the help cross-reference function FUNCTION with args ARGS. Things are set up properly so that the resulting help-buffer has a proper [back] button. (defalias 'help-do-xref #[(pos function args) "\303\304 \n\")\207" [help-xref-following function args t apply] 3 (#$ . 15416)]) #@47 Follow the cross-reference that you click on. (defalias 'help-follow-mouse #[nil "\300\301!\207" [error "No cross-reference here"] 2 (#$ . 15704) nil]) #@90 Follow cross-reference at point. For the cross-reference format, see `help-make-xrefs'. (defalias 'help-follow #[nil "\300\301!\207" [error "No cross-reference here"] 2 (#$ . 15862) nil]) #@137 In help buffer, show docs for symbol at POS, defaulting to point. Show all docs for that symbol as either a variable, function or face. (defalias 'help-follow-symbol #[(&optional pos) "\204`\302\212b\210\303\304!\210`\305\304!\210`{)!\306 !\2041 \307N\2041\310 !\2041\311 !\2057\312\313 C#)\207" [pos sym intern skip-syntax-backward "w_" skip-syntax-forward boundp variable-documentation fboundp facep help-do-xref help-xref-interned] 4 (#$ . 16058) "d"]) #@303 Insert STRING to the help buffer and install xref info for it. This function can be used to restore the old contents of the help buffer when going back to the previous topic in the xref stack. It is needed in case when it is impossible to recompute the old contents of the help buffer by other means. (defalias 'help-insert-string #[(string) "\302D\303 \220c\221\207" [string help-xref-stack-item help-insert-string help-buffer] 2 (#$ . 16532)]) (provide 'help-mode)