Changeset 4018 for vendor/emacs-CVS_HEAD/lisp/help.el
- Timestamp:
- 01/28/06 09:46:44 (3 years ago)
- Files:
-
- vendor/emacs-CVS_HEAD/lisp/help.el (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
vendor/emacs-CVS_HEAD/lisp/help.el
r3988 r4018 39 39 (add-hook 'temp-buffer-show-hook 'help-mode-finish) 40 40 41 (defvar help-map (make-sparse-keymap) 41 (defvar help-map 42 (let ((map (make-sparse-keymap))) 43 (define-key map (char-to-string help-char) 'help-for-help) 44 (define-key map [help] 'help-for-help) 45 (define-key map [f1] 'help-for-help) 46 (define-key map "." 'display-local-help) 47 (define-key map "?" 'help-for-help) 48 49 (define-key map "\C-c" 'describe-copying) 50 (define-key map "\C-d" 'describe-distribution) 51 (define-key map "\C-e" 'view-emacs-problems) 52 (define-key map "\C-f" 'view-emacs-FAQ) 53 (define-key map "\C-m" 'view-order-manuals) 54 (define-key map "\C-n" 'view-emacs-news) 55 (define-key map "\C-p" 'describe-project) 56 (define-key map "\C-t" 'view-todo) 57 (define-key map "\C-w" 'describe-no-warranty) 58 59 ;; This does not fit the pattern, but it is natural given the C-\ command. 60 (define-key map "\C-\\" 'describe-input-method) 61 62 (define-key map "C" 'describe-coding-system) 63 (define-key map "F" 'Info-goto-emacs-command-node) 64 (define-key map "I" 'describe-input-method) 65 (define-key map "K" 'Info-goto-emacs-key-command-node) 66 (define-key map "L" 'describe-language-environment) 67 (define-key map "S" 'info-lookup-symbol) 68 69 (define-key map "a" 'apropos-command) 70 (define-key map "b" 'describe-bindings) 71 (define-key map "c" 'describe-key-briefly) 72 (define-key map "d" 'apropos-documentation) 73 (define-key map "e" 'view-echo-area-messages) 74 (define-key map "f" 'describe-function) 75 (define-key map "h" 'view-hello-file) 76 77 (define-key map "i" 'info) 78 (define-key map "4i" 'info-other-window) 79 80 (define-key map "k" 'describe-key) 81 (define-key map "l" 'view-lossage) 82 (define-key map "m" 'describe-mode) 83 (define-key map "n" 'view-emacs-news) 84 (define-key map "p" 'finder-by-keyword) 85 (define-key map "r" 'info-emacs-manual) 86 (define-key map "s" 'describe-syntax) 87 (define-key map "t" 'help-with-tutorial) 88 (define-key map "w" 'where-is) 89 (define-key map "v" 'describe-variable) 90 (define-key map "q" 'help-quit) 91 map) 42 92 "Keymap for characters following the Help key.") 43 93 … … 47 97 (fset 'help-command help-map) 48 98 49 (define-key help-map (char-to-string help-char) 'help-for-help)50 (define-key help-map [help] 'help-for-help)51 (define-key help-map [f1] 'help-for-help)52 (define-key help-map "." 'display-local-help)53 (define-key help-map "?" 'help-for-help)54 55 (define-key help-map "\C-c" 'describe-copying)56 (define-key help-map "\C-d" 'describe-distribution)57 (define-key help-map "\C-e" 'view-emacs-problems)58 (define-key help-map "\C-f" 'view-emacs-FAQ)59 (define-key help-map "\C-m" 'view-order-manuals)60 (define-key help-map "\C-n" 'view-emacs-news)61 (define-key help-map "\C-p" 'describe-project)62 (define-key help-map "\C-t" 'view-todo)63 (define-key help-map "\C-w" 'describe-no-warranty)64 65 ;; This does not fit the pattern, but it is natural given the C-\ command.66 (define-key help-map "\C-\\" 'describe-input-method)67 68 (define-key help-map "C" 'describe-coding-system)69 (define-key help-map "F" 'Info-goto-emacs-command-node)70 (define-key help-map "I" 'describe-input-method)71 (define-key help-map "K" 'Info-goto-emacs-key-command-node)72 (define-key help-map "L" 'describe-language-environment)73 (define-key help-map "S" 'info-lookup-symbol)74 75 (define-key help-map "a" 'apropos-command)76 77 (define-key help-map "b" 'describe-bindings)78 79 (define-key help-map "c" 'describe-key-briefly)80 81 (define-key help-map "d" 'apropos-documentation)82 83 (define-key help-map "e" 'view-echo-area-messages)84 85 (define-key help-map "f" 'describe-function)86 87 (define-key help-map "h" 'view-hello-file)88 89 (define-key help-map "i" 'info)90 (define-key help-map "4i" 'info-other-window)91 92 (define-key help-map "k" 'describe-key)93 94 (define-key help-map "l" 'view-lossage)95 96 (define-key help-map "m" 'describe-mode)97 98 (define-key help-map "n" 'view-emacs-news)99 100 (define-key help-map "p" 'finder-by-keyword)101 99 (autoload 'finder-by-keyword "finder" 102 100 "Find packages matching a given keyword." t) 103 104 (define-key help-map "r" 'info-emacs-manual)105 106 (define-key help-map "s" 'describe-syntax)107 108 (define-key help-map "t" 'help-with-tutorial)109 110 (define-key help-map "w" 'where-is)111 112 (define-key help-map "v" 'describe-variable)113 114 (define-key help-map "q" 'help-quit)115 101 116 102 ;; insert-button makes the action nil if it is not store somewhere … … 126 112 "What to do to \"exit\" the help buffer. 127 113 This is a list 128 (WINDOW . t) delete the selected window, go to WINDOW. 114 (WINDOW . t) delete the selected window (and possibly its frame, 115 see `quit-window' and `View-quit'), go to WINDOW. 129 116 (WINDOW . quit-window) do quit-window, then select WINDOW. 130 117 (WINDOW BUF START POINT) display BUF at START, POINT, then select WINDOW.") … … 134 121 This function assumes that `standard-output' is the help buffer. 135 122 It computes a message, and applies the optional argument FUNCTION to it. 136 If FUNCTION is nil, it applies `message', thus displaying the message." 123 If FUNCTION is nil, it applies `message', thus displaying the message. 124 In addition, this function sets up `help-return-method', which see, that 125 specifies what to do when the user exits the help buffer." 137 126 (and (not (get-buffer-window standard-output)) 138 127 (let ((first-message 139 (cond ((special-display-p (buffer-name standard-output)) 128 (cond ((or 129 pop-up-frames 130 (special-display-p (buffer-name standard-output))) 140 131 (setq help-return-method (cons (selected-window) t)) 141 132 ;; If the help output buffer is a special display buffer, … … 169 160 ;; If the help buffer will go in a separate frame, 170 161 ;; it's no use mentioning a command to scroll, so don't. 171 (if (special-display-p (buffer-name standard-output)) 162 (if (or pop-up-windows 163 (special-display-p (buffer-name standard-output))) 172 164 nil 173 165 (if (same-window-p (buffer-name standard-output)) … … 187 179 ;; It can't find this, but nobody will look. 188 180 (make-help-screen help-for-help-internal 189 "a b c C e f F i I k C-k l L m p s t v w C-c C-d C-f C-n C-p C-t C-w . or ? :"181 "a b c C e f F i I k C-k l L m p r s t v w C-c C-d C-f C-n C-p C-t C-w . or ? :" 190 182 "You have typed %THIS-KEY%, the help character. Type a Help option: 191 183 \(Use SPC or DEL to scroll through this text. Type \\<help-map>\\[help-quit] to exit the Help command.) 192 184 193 185 a command-apropos. Give a list of words or a regexp, to get a list of 194 commands whose names match (they contain two or more of the words, 195 or a match for the regexp). See also the apropos command. 186 commands whose names match. See also the apropos command. 196 187 b describe-bindings. Display table of all key bindings. 197 188 c describe-key-briefly. Type a command key sequence; … … 226 217 n view-emacs-news. Display news of recent Emacs changes. 227 218 p finder-by-keyword. Find packages matching a given topic keyword. 219 r info-emacs-manual. Display the Emacs manual in Info mode. 228 220 s describe-syntax. Display contents of syntax table, plus explanations. 229 221 S info-lookup-symbol. Display the definition of a specific symbol … … 591 583 ;; Ok, now look up the key and name the command. 592 584 (let ((defn (or (string-key-binding key) 593 (key-binding key )))585 (key-binding key t))) 594 586 key-desc) 595 587 ;; Don't bother user with strings from (e.g.) the select-paste menu. … … 616 608 pass KEY as a string or a vector. 617 609 618 If non-nil, UNTRANSLATED is a vector of the corresponding untranslated events.610 If non-nil, UNTRANSLATED is a vector of the corresponding untranslated events. 619 611 It can also be a number, in which case the untranslated events from 620 612 the last key sequence entered are used." … … 636 628 (set-buffer (window-buffer window)) 637 629 (goto-char position)) 638 (let ((defn (or (string-key-binding key) (key-binding key ))))630 (let ((defn (or (string-key-binding key) (key-binding key t)))) 639 631 (if (or (null defn) (integerp defn) (equal defn 'undefined)) 640 632 (message "%s is undefined" (help-key-description key untranslated))
