Mercurial > emacs
comparison lisp/help.el @ 67224:1a4439fe2adc
(help-map): Move initialization into declaration.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 30 Nov 2005 16:09:58 +0000 |
parents | 0ae69a6a591d |
children | 8cf27ba1d450 |
comparison
equal
deleted
inserted
replaced
67223:23fa76e60a61 | 67224:1a4439fe2adc |
---|---|
36 | 36 |
37 ;; This makes `with-output-to-temp-buffer' buffers use `help-mode'. | 37 ;; This makes `with-output-to-temp-buffer' buffers use `help-mode'. |
38 (add-hook 'temp-buffer-setup-hook 'help-mode-setup) | 38 (add-hook 'temp-buffer-setup-hook 'help-mode-setup) |
39 (add-hook 'temp-buffer-show-hook 'help-mode-finish) | 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 "Keymap for characters following the Help key.") | 92 "Keymap for characters following the Help key.") |
43 | 93 |
44 (define-key global-map (char-to-string help-char) 'help-command) | 94 (define-key global-map (char-to-string help-char) 'help-command) |
45 (define-key global-map [help] 'help-command) | 95 (define-key global-map [help] 'help-command) |
46 (define-key global-map [f1] 'help-command) | 96 (define-key global-map [f1] 'help-command) |
47 (fset 'help-command help-map) | 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 (autoload 'finder-by-keyword "finder" | 99 (autoload 'finder-by-keyword "finder" |
102 "Find packages matching a given keyword." t) | 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 ;; insert-button makes the action nil if it is not store somewhere | 102 ;; insert-button makes the action nil if it is not store somewhere |
117 (defvar help-button-cache nil) | 103 (defvar help-button-cache nil) |
118 | 104 |
119 | 105 |