Show
Ignore:
Timestamp:
01/28/06 09:46:44 (3 years ago)
Author:
miyoshi
Message:

Update.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • vendor/emacs-CVS_HEAD/lisp/help.el

    r3988 r4018  
    3939(add-hook 'temp-buffer-show-hook 'help-mode-finish) 
    4040 
    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) 
    4292  "Keymap for characters following the Help key.") 
    4393 
     
    4797(fset 'help-command help-map) 
    4898 
    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) 
    10199(autoload 'finder-by-keyword "finder" 
    102100  "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) 
    115101 
    116102;; insert-button makes the action nil if it is not store somewhere 
     
    126112  "What to do to \"exit\" the help buffer. 
    127113This 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. 
    129116 (WINDOW . quit-window)    do quit-window, then select WINDOW. 
    130117 (WINDOW BUF START POINT)  display BUF at START, POINT, then select WINDOW.") 
     
    134121This function assumes that `standard-output' is the help buffer. 
    135122It computes a message, and applies the optional argument FUNCTION to it. 
    136 If FUNCTION is nil, it applies `message', thus displaying the message." 
     123If FUNCTION is nil, it applies `message', thus displaying the message. 
     124In addition, this function sets up `help-return-method', which see, that 
     125specifies what to do when the user exits the help buffer." 
    137126  (and (not (get-buffer-window standard-output)) 
    138127       (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))) 
    140131                     (setq help-return-method (cons (selected-window) t)) 
    141132                     ;; If the help output buffer is a special display buffer, 
     
    169160                   ;; If the help buffer will go in a separate frame, 
    170161                   ;; 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))) 
    172164                       nil 
    173165                     (if (same-window-p (buffer-name standard-output)) 
     
    187179;; It can't find this, but nobody will look. 
    188180(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 ? :" 
    190182  "You have typed %THIS-KEY%, the help character.  Type a Help option: 
    191183\(Use SPC or DEL to scroll through this text.  Type \\<help-map>\\[help-quit] to exit the Help command.) 
    192184 
    193185a  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. 
    196187b  describe-bindings.  Display table of all key bindings. 
    197188c  describe-key-briefly.  Type a command key sequence; 
     
    226217n  view-emacs-news.  Display news of recent Emacs changes. 
    227218p  finder-by-keyword. Find packages matching a given topic keyword. 
     219r  info-emacs-manual.  Display the Emacs manual in Info mode. 
    228220s  describe-syntax.  Display contents of syntax table, plus explanations. 
    229221S  info-lookup-symbol.  Display the definition of a specific symbol 
     
    591583      ;; Ok, now look up the key and name the command. 
    592584      (let ((defn (or (string-key-binding key) 
    593                       (key-binding key))) 
     585                      (key-binding key t))) 
    594586            key-desc) 
    595587        ;; Don't bother user with strings from (e.g.) the select-paste menu. 
     
    616608pass KEY as a string or a vector. 
    617609 
    618 If non-nil, UNTRANSLATED is a vector of the correspondinguntranslated events. 
     610If non-nil, UNTRANSLATED is a vector of the corresponding untranslated events. 
    619611It can also be a number, in which case the untranslated events from 
    620612the last key sequence entered are used." 
     
    636628            (set-buffer (window-buffer window)) 
    637629        (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)))) 
    639631        (if (or (null defn) (integerp defn) (equal defn 'undefined)) 
    640632            (message "%s is undefined" (help-key-description key untranslated))