;ELC ;;; Compiled by cyd@localhost on Mon Apr 23 22:20:45 2007 ;;; from file /home/cyd/emacs/lisp/ehelp.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 "`ehelp.el' was compiled for Emacs 19.29 or later")) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'electric) #@61 Keymap defining commands available in `electric-help-mode'. (defvar electric-help-map nil (#$ . 577)) (byte-code "\301B\302\301!\204\303\301\304\"\210\305\306\304\307\310\311\312\313&\207" [current-load-list electric-help-form-to-execute default-boundp set-default nil custom-declare-group electric-help "Electric help facility." :version "21.1" :group help] 8) #@72 If set, adjust help window sizes to buffer sizes when displaying help. (custom-declare-variable 'electric-help-shrink-window 't '(#$ . 950) :type 'boolean :group 'electric-help) #@65 Hook run by `with-electric-help' after initializing the buffer. (custom-declare-variable 'electric-help-mode-hook 'nil '(#$ . 1134) :type 'hook :group 'electric-help) (byte-code "\303\304\305\306#\210\204\246\307 \305 !\210\310 \311\304#\210\310 \312\304#\210\310 \313\304#\210\310 \314\304#\210\310 \315\304#\210\310 \316\304#\210\310 \317\304#\210\310 \320\304#\210\310 \321\304#\210\310 \322\304#\210\310 \323\304#\210\310 \324\n!\325#\210\310 \326\325#\210\310 \327\330#\210\310 \331\332#\210\310 \333\334#\210\310 \335\334#\210\310 \336\337#\210\310 \340\341#\210\310 \342\341#\210\310 \343\344#\210\310 \345\344#\210\310 \346\347#\210\310 \350\351#\210 )\303\207" [electric-help-map map help-char put electric-help-undefined suppress-keymap t make-keymap define-key "" [67108912] [67108913] [67108914] [67108915] [67108916] [67108917] [67108918] [67108919] [67108920] [67108921] char-to-string electric-help-help "?" " " scroll-up "" scroll-down "." beginning-of-buffer "<" ">" end-of-buffer "Q" electric-help-exit "q" "R" electric-help-retain "r" "x" electric-help-execute-extended "" electric-help-ctrl-x-prefix] 4) #@146 `with-electric-help' temporarily places its buffer in this mode. (On exit from `with-electric-help', the buffer is put in `default-major-mode'.) (defalias 'electric-help-mode #[nil "\305\306\307\310\311\f!\210\312\313\314\"\210\315\316!\207" [buffer-read-only mode-name major-mode mode-line-buffer-identification electric-help-map t "Help" help (" Help: %b") use-local-map add-hook mouse-leave-buffer-hook electric-help-retain view-mode -1] 3 (#$ . 2273)]) #@1137 Pop up an "electric" help buffer. THUNK is a function of no arguments which is called to initialize the contents of BUFFER. BUFFER defaults to `*Help*'. BUFFER will be erased before THUNK is called unless NOERASE is non-nil. THUNK will be called while BUFFER is current and with `standard-output' bound to the buffer specified by BUFFER. If THUNK returns nil, we display BUFFER starting at the top, and shrink the window to fit. If THUNK returns non-nil, we don't do those things. After THUNK has been called, this function "electrically" pops up a window in which BUFFER is displayed and allows the user to scroll through that buffer in `electric-help-mode'. The window's height will be at least MINHEIGHT if this value is non-nil. If THUNK returns nil, we display BUFFER starting at the top, and shrink the window to fit if `electric-help-shrink-window' is non-nil. If THUNK returns non-nil, we don't do those things. When the user exits (with `electric-help-exit', or otherwise), the help buffer's window disappears (i.e., we use `save-window-excursion'), and BUFFER is put into `default-major-mode' (or `fundamental-mode'). (defalias 'with-electric-help #[(thunk &optional buffer noerase minheight) "\306\206\307!\310\311!\312 \313\211\314\216\212\f\203 \315\316 !b\210\311\317!\210)\212q\210\203@\320 W\203@\321\320 Z!\210\322 \210\313\204N\323 \210) ! \204nq\210\324\313!\210eb\210\f\203n\"\203n\325 \210)q\210\326\327!\210\311\330 \242\331=\203\207\312 \202\211\311\332>\205\224\333\334\332\".\207" [buffer electric-help-form-to-execute bury config one pop-up-windows get-buffer-create "*Help*" one-window-p t current-window-configuration nil ((byte-code "\305\306!\210q\210\307\211\310\311\217\210\312\n!\210 \203\313!\210\314!\210\315\f!\207" [buffer buffer-read-only config bury electric-help-form-to-execute message "" nil (byte-code "\206\301 \207" [default-major-mode fundamental-mode] 1) ((error)) set-window-configuration replace-buffer-in-windows bury-buffer eval] 4)) window-start selected-window pop-to-buffer window-height enlarge-window electric-help-mode erase-buffer set-buffer-modified-p shrink-window-if-larger-than-buffer run-hooks electric-help-mode-hook electric-help-command-loop retain electric-help-retain remove-hook mouse-leave-buffer-hook minheight buffer-read-only noerase standard-output thunk electric-help-shrink-window] 4 (#$ . 2743)]) (defalias 'electric-help-command-loop #[nil "\300\301\215\207" [exit (byte-code "\306d!\203\307\310\311\312!\"\210\313 C\211\314\232\203\315\316\317\320\"\210\315\211\211\211\321\322\315\320#\323=\205G\321\324\315\320#\325=\205G\321\326\315\320#\327=\205G\321\330\315\320#\331=\332\317\333\320#-\207" [unread-command-events standard neither both down up pos-visible-in-window-p message "%s" substitute-command-keys "<<< Press Space to bury the help buffer, Press \\[electric-help-retain] to retain it >>>" read-event (32) nil throw exit t key-binding " " scroll-up "" scroll-down "q" electric-help-exit "r" electric-help-retain Electric-command-loop #[nil "\306\307!\210\310e!\310dS!\n\203\311\202v \2031\2031 \203%\312\202v\f\206v\313\314!\211\202v \203I \203=\315\202v \206v\313\316!\211\202v\203c \203U\317\202v\206v\313\320!\211\202v \203k\321\202v\206v\313\322!\211*\207" [max min isearch-mode standard neither up sit-for 0 pos-visible-in-window-p noprompt "Press q to exit, r to retain " substitute-command-keys "Press \\[electric-help-exit] to exit, \\[electric-help-retain] to retain " "Press SPC to scroll, q to exit, r to retain " "Press \\[scroll-up] to scroll, \\[electric-help-exit] to exit, \\[electric-help-retain] to retain " "Press DEL to scroll back, q to exit, r to retain " "Press \\[scroll-down] to scroll back, \\[electric-help-exit] to exit, \\[electric-help-retain] to retain " "Press SPC to scroll, DEL to scroll back, q to exit, r to retain " "Press \\[scroll-up] to scroll, \\[scroll-down] to scroll back, \\[electric-help-exit] to exit, \\[electric-help-retain] to retain " down both] 3]] 8)] 2]) #@116 Exit `with-electric-help', restoring the previous window/buffer configuration. (The *Help* buffer will be buried.) (defalias 'electric-help-exit #[nil "\301>\205\302\300\301\"\210\303\304\305\"\207" [mouse-leave-buffer-hook electric-help-retain remove-hook throw exit t] 3 (#$ . 6861) nil]) #@178 Exit `with-electric-help', retaining the current window/buffer configuration. (The *Help* buffer will not be selected, but \[switch-to-buffer-other-window] RET will select it.) (defalias 'electric-help-retain #[nil "\301>\205\302\300\301\"\210\303\304\305\"\207" [mouse-leave-buffer-hook electric-help-retain remove-hook throw exit (retain)] 3 (#$ . 7162) nil]) (defalias 'electric-help-undefined #[nil "\300\301\302\303\304 \305#\306\307\310\311#\312=\203\307\202\313\314!#\207" [error "%s is undefined -- Press %s to exit" mapconcat single-key-description this-command-keys " " key-binding "q" nil t electric-help-exit substitute-command-keys "\\[electric-help-exit]"] 7 nil nil]) (defalias 'electric-help-help #[nil "\300\301\302\303#\304=\203/\300\305\302\303#\306=\203/\300\307\302\303#\310=\203/\300\311\302\303#\312=\203/\313\314!\210\2026\313\315\316\317!\"\210\320\321!\207" [key-binding "q" nil t electric-help-exit " " scroll-up "" scroll-down "r" electric-help-retain message "SPC scrolls up, DEL scrolls down, q exits burying help buffer, r exits" "%s" substitute-command-keys "\\[scroll-up] scrolls up, \\[scroll-down] scrolls down, \\[electric-help-exit] exits burying help buffer, \\[electric-help-retain] exits" sit-for 2] 4 nil nil]) (defalias 'electric-helpify #[(fun &optional name) "\206\301\302\213\205\303\304\305#)\207" [name "*Help*" ((byte-code "\305K\306 !\307\n!\n\203\310\n!\204\311\312\216\313\314\315\316\f!!\"\210\n\203/\212\nq\210\317\320!\210)\305\321M\210\322\f!\210\306 !\205W\310\306 !!\205W\n?\206W\n\306 !=?\206W\307\n!?,\207" [p name b m fun print-help-return-message get-buffer buffer-modified-p get-buffer-window nil ((byte-code "\303M\210 \203\304 !\203\212 q\210\305\n!\210)\303\207" [p b m print-help-return-message buffer-name set-buffer-modified-p] 2)) message "%s..." capitalize symbol-name set-buffer-modified-p t ignore call-interactively] 5)) with-electric-help ignore t] 4]) (defalias 'electric-help-execute-extended #[(prefixarg) "\301\302 \207" [electric-help-form-to-execute (execute-extended-command nil) electric-help-retain] 1 nil "p"]) (defalias 'electric-help-ctrl-x-prefix #[(prefixarg) "\301\302 \207" [electric-help-form-to-execute (progn (message nil) (setq unread-command-char 24)) electric-help-retain] 1 nil "p"]) (defalias 'electric-describe-key #[nil "\300\301!\207" [electric-helpify describe-key] 2 nil nil]) (defalias 'electric-describe-mode #[nil "\300\301!\207" [electric-helpify describe-mode] 2 nil nil]) (defalias 'electric-view-lossage #[nil "\300\301!\207" [electric-helpify view-lossage] 2 nil nil]) (defalias 'electric-describe-function #[nil "\300\301!\207" [electric-helpify describe-function] 2 nil nil]) (defalias 'electric-describe-variable #[nil "\300\301!\207" [electric-helpify describe-variable] 2 nil nil]) (defalias 'electric-describe-bindings #[nil "\300\301!\207" [electric-helpify describe-bindings] 2 nil nil]) (defalias 'electric-describe-syntax #[nil "\300\301!\207" [electric-helpify describe-syntax] 2 nil nil]) (defalias 'electric-command-apropos #[nil "\300\301\302\"\207" [electric-helpify command-apropos "*Apropos*"] 3 nil nil]) (defalias 'electric-apropos #[nil "\300\301!\207" [electric-helpify apropos] 2 nil nil]) (byte-code "\301B\304\301!\204\305\301\306\"\210 \204P\307\n!\310\311\312 #\210\310\313\314 #\210\310\315\316 #\210\310\317\320 #\210\310\321\322 #\210\310\323\324 #\210\310\325\326 #\210\310\327\330 #\210\310\331\332 #\210 )\333\334 \"\210\335\334\336\337#\210\340\341!\207" [current-load-list ehelp-map help-map map default-boundp set-default nil copy-keymap substitute-key-definition apropos electric-apropos command-apropos electric-command-apropos describe-key electric-describe-key describe-mode electric-describe-mode view-lossage electric-view-lossage describe-function electric-describe-function describe-variable electric-describe-variable describe-bindings electric-describe-bindings describe-syntax electric-describe-syntax defalias ehelp-command put documentation "Prefix command for ehelp." provide ehelp] 4)