aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2008-02-29 23:37:38 +0000
committerKim F. Storm2008-02-29 23:37:38 +0000
commit7b01c8d79e9ff796e511ab3ac161c6b7617f957a (patch)
treeb78e4177f0e7812c83f467036b1a91f60f11169e
parent4a6c8615a281e79f973b1d10188407562d9c4ee8 (diff)
downloademacs-7b01c8d79e9ff796e511ab3ac161c6b7617f957a.tar.gz
emacs-7b01c8d79e9ff796e511ab3ac161c6b7617f957a.zip
(view-emacs-todo): Rename from view-todo.
(describe-gnu-project): Rename from describe-project. Users changed. (view-help-file): New helper function. (describe-distribution, describe-copying, describe-gnu-project) (view-todo, view-order-manuals, view-emacs-problems): Use it. (view-emacs-debugging, view-external-packages): New commands. (help-map): Move describe-distribution to C-h C-o (ordering). Move view-emacs-problems to C-h C-p (problems). Bind view-emacs-debugging to C-h C-d (debugging). Bind view-external-packages to C-h C-e (extras). (help-for-help-internal): Cleanup and align descriptions. Remove command names to reduce clutter.
-rw-r--r--lisp/help.el146
1 files changed, 75 insertions, 71 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 5260ffc9279..30734752abf 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -55,7 +55,7 @@
55;; `with-output-to-temp-buffer'. `with-help-window' has this point 55;; `with-output-to-temp-buffer'. `with-help-window' has this point
56;; nowhere before exiting. Currently used by `view-lossage' to assert 56;; nowhere before exiting. Currently used by `view-lossage' to assert
57;; that the last keystrokes are always visible. 57;; that the last keystrokes are always visible.
58(defvar help-window-point-marker (make-marker) 58(defvar help-window-point-marker (make-marker)
59 "Marker to override default `window-point' of `help-window'.") 59 "Marker to override default `window-point' of `help-window'.")
60 60
61(defvar help-map 61(defvar help-map
@@ -68,13 +68,14 @@
68 68
69 (define-key map "\C-a" 'about-emacs) 69 (define-key map "\C-a" 'about-emacs)
70 (define-key map "\C-c" 'describe-copying) 70 (define-key map "\C-c" 'describe-copying)
71 (define-key map "\C-d" 'describe-distribution) 71 (define-key map "\C-d" 'view-emacs-debugging)
72 (define-key map "\C-e" 'view-emacs-problems) 72 (define-key map "\C-e" 'view-external-packages)
73 (define-key map "\C-f" 'view-emacs-FAQ) 73 (define-key map "\C-f" 'view-emacs-FAQ)
74 (define-key map "\C-m" 'view-order-manuals) 74 (define-key map "\C-m" 'view-order-manuals)
75 (define-key map "\C-n" 'view-emacs-news) 75 (define-key map "\C-n" 'view-emacs-news)
76 (define-key map "\C-p" 'describe-project) 76 (define-key map "\C-o" 'describe-distribution)
77 (define-key map "\C-t" 'view-todo) 77 (define-key map "\C-p" 'view-emacs-problems)
78 (define-key map "\C-t" 'view-emacs-todo)
78 (define-key map "\C-w" 'describe-no-warranty) 79 (define-key map "\C-w" 'describe-no-warranty)
79 80
80 ;; This does not fit the pattern, but it is natural given the C-\ command. 81 ;; This does not fit the pattern, but it is natural given the C-\ command.
@@ -93,6 +94,7 @@
93 (define-key map "d" 'apropos-documentation) 94 (define-key map "d" 'apropos-documentation)
94 (define-key map "e" 'view-echo-area-messages) 95 (define-key map "e" 'view-echo-area-messages)
95 (define-key map "f" 'describe-function) 96 (define-key map "f" 'describe-function)
97 (define-key map "g" 'describe-gnu-project)
96 (define-key map "h" 'view-hello-file) 98 (define-key map "h" 'view-hello-file)
97 99
98 (define-key map "i" 'info) 100 (define-key map "i" 'info)
@@ -201,63 +203,52 @@ specifies what to do when the user exits the help buffer."
201(defalias 'help-for-help 'help-for-help-internal) 203(defalias 'help-for-help 'help-for-help-internal)
202;; It can't find this, but nobody will look. 204;; It can't find this, but nobody will look.
203(make-help-screen help-for-help-internal 205(make-help-screen help-for-help-internal
204 "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 ? :" 206 "Type a help option: [abcCdefFgiIkKlLmnprstvw.] C-[cdefmnoptw] or ?"
205 "You have typed %THIS-KEY%, the help character. Type a Help option: 207 "You have typed %THIS-KEY%, the help character. Type a Help option:
206\(Use SPC or DEL to scroll through this text. Type \\<help-map>\\[help-quit] to exit the Help command.) 208\(Use SPC or DEL to scroll through this text. Type \\<help-map>\\[help-quit] to exit the Help command.)
207 209
208a command-apropos. Type a list of words or a regexp; it shows a list of 210a PATTERN Show commands whose name matches the PATTERN (a list of words
209 commands whose names match. See also the apropos command. 211 or a regexp). See also the `apropos' command.
210b describe-bindings. Display a table of all key bindings. 212b Display all key bindings.
211c describe-key-briefly. Type a key sequence; 213c KEYS Display the command name run by the given key sequence.
212 it displays the command name run by that key sequence. 214C CODING Describe the given coding system, or RET for current ones.
213C describe-coding-system. Type the name of the coding system to describe, 215d PATTERN Show a list of functions, variables, and other items whose
214 or just RET to describe the ones currently in use. 216 documentation matches the PATTERN (a list of words or a regexp).
215d apropos-documentation. Type a pattern (a list of words or a regexp), and 217e Go to the *Messages* buffer which logs echo-area messages.
216 it shows a list of functions, variables, and other items whose 218f FUNCTION Display documentation for the given function.
217 documentation matches that pattern. See also the apropos command. 219F COMMAND Show the on-line manual's section that describes the command.
218e view-echo-area-messages. Go to the buffer that logs echo-area messages. 220g Display information about the GNU project.
219f describe-function. Type a function name and you see its documentation. 221h Display the HELLO file which illustrates various scripts.
220F Info-goto-emacs-command-node. Type a command name; 222i Start the Info documentation reader: read on-line manuals.
221 it goes to the on-line manual's section that describes the command. 223I METHOD Describe a specific input method, or RET for current.
222h Display the HELLO file which illustrates various scripts. 224k KEYS Display the full documentation for the key sequence.
223i info. The Info documentation reader: read on-line manuals. 225K KEYS Show the on-line manual's section for the command bound to KEYS.
224I describe-input-method. Describe a specific input method (if you type 226l Show last 100 characters you typed (lossage).
225 its name) or the current input method (if you type just RET). 227L LANG-ENV Describes a specific language environment, or RET for current.
226k describe-key. Type a key sequence; 228m Display documentation of current minor modes and current major mode,
227 it displays the full documentation for that key sequence. 229 including their special commands.
228K Info-goto-emacs-key-command-node. Type a key sequence; 230n Display news of recent Emacs changes.
229 it goes to the on-line manual's section that describes 231p TOPIC Find packages matching a given topic keyword.
230 the command bound to that key. 232r Display the Emacs manual in Info mode.
231l view-lossage. Show last 100 characters you typed. 233s Display contents of current syntax table, plus explanations.
232L describe-language-environment. This describes either a 234S SYMBOL Show the section for the given symbol in the on-line manual
233 specific language environment (if you type its name) 235 for the programming language used in this buffer.
234 or the current language environment (if you type just RET). 236t Start the Emacs learn-by-doing tutorial.
235m describe-mode. Display documentation of current minor modes, 237v VARIABLE Display the given variable's documentation and value.
236 and the current major mode, including their special commands. 238w COMMAND Display which keystrokes invoke the given command (where-is).
237n view-emacs-news. Display news of recent Emacs changes. 239. Display any available local help at point in the echo area.
238p finder-by-keyword. Find packages matching a given topic keyword. 240
239r info-emacs-manual. Display the Emacs manual in Info mode. 241C-a Information about Emacs.
240s describe-syntax. Display contents of syntax table, plus explanations. 242C-c Emacs copying permission (GNU General Public License).
241S info-lookup-symbol. Type a symbol; it goes to that symbol in the 243C-d Instructions for debugging GNU Emacs.
242 on-line manual for the programming language used in this buffer. 244C-e External packages and information about Emacs.
243t help-with-tutorial. Select the Emacs learn-by-doing tutorial. 245C-f Emacs FAQ.
244v describe-variable. Type name of a variable; 246C-m How to order printed Emacs manuals.
245 it displays the variable's documentation and value. 247C-n News of recent Emacs changes.
246w where-is. Type a command name; it displays which keystrokes 248C-o Emacs ordering and distribution information.
247 invoke that command. 249C-p Info about known Emacs problems.
248. display-local-help. Display any available local help at point 250C-t Emacs TODO list.
249 in the echo area. 251C-w Information on absence of warranty for GNU Emacs."
250
251C-a Display information about Emacs.
252C-c Display Emacs copying permission (GNU General Public License).
253C-d Display Emacs ordering information.
254C-e Display info about Emacs problems.
255C-f Display the Emacs FAQ.
256C-m Display how to order printed Emacs manuals.
257C-n Display news of recent Emacs changes.
258C-p Display information about the GNU project.
259C-t Display the Emacs TODO list.
260C-w Display information on absence of warranty for GNU Emacs."
261 help-map) 252 help-map)
262 253
263 254
@@ -303,22 +294,26 @@ If that doesn't give a function, return nil."
303 294
304;;; `User' help functions 295;;; `User' help functions
305 296
297(defun view-help-file (file &optional dir)
298 (view-file (expand-file-name file (or dir data-directory)))
299 (goto-address)
300 (goto-char (point-min)))
301
306(defun describe-distribution () 302(defun describe-distribution ()
307 "Display info on how to obtain the latest version of GNU Emacs." 303 "Display info on how to obtain the latest version of GNU Emacs."
308 (interactive) 304 (interactive)
309 (view-file (expand-file-name "DISTRIB" data-directory))) 305 (view-help-file "DISTRIB"))
310 306
311(defun describe-copying () 307(defun describe-copying ()
312 "Display info on how you may redistribute copies of GNU Emacs." 308 "Display info on how you may redistribute copies of GNU Emacs."
313 (interactive) 309 (interactive)
314 (view-file (expand-file-name "COPYING" data-directory)) 310 (view-help-file "COPYING"))
315 (goto-char (point-min)))
316 311
317(defun describe-project () 312(defalias 'describe-project 'describe-gnu-project)
313(defun describe-gnu-project ()
318 "Display info on the GNU project." 314 "Display info on the GNU project."
319 (interactive) 315 (interactive)
320 (view-file (expand-file-name "THE-GNU-PROJECT" data-directory)) 316 (view-help-file "THE-GNU-PROJECT"))
321 (goto-char (point-min)))
322 317
323(defun describe-no-warranty () 318(defun describe-no-warranty ()
324 "Display info on all the kinds of warranty Emacs does NOT have." 319 "Display info on all the kinds of warranty Emacs does NOT have."
@@ -417,11 +412,11 @@ With argument, display info only for the selected version."
417 (beginning-of-line) 412 (beginning-of-line)
418 (point))))))) 413 (point)))))))
419 414
420 415(defalias 'view-todo 'view-emacs-todo)
421(defun view-todo (&optional arg) 416(defun view-emacs-todo (&optional arg)
422 "Display the Emacs TODO list." 417 "Display the Emacs TODO list."
423 (interactive "P") 418 (interactive "P")
424 (view-file (expand-file-name "TODO" data-directory))) 419 (view-help-file "TODO"))
425 420
426(defun view-echo-area-messages () 421(defun view-echo-area-messages ()
427 "View the log of recent echo-area messages: the `*Messages*' buffer. 422 "View the log of recent echo-area messages: the `*Messages*' buffer.
@@ -433,8 +428,7 @@ is specified by the variable `message-log-max'."
433(defun view-order-manuals () 428(defun view-order-manuals ()
434 "Display the Emacs ORDERS file." 429 "Display the Emacs ORDERS file."
435 (interactive) 430 (interactive)
436 (view-file (expand-file-name "ORDERS" data-directory)) 431 (view-help-file "ORDERS"))
437 (goto-address))
438 432
439(defun view-emacs-FAQ () 433(defun view-emacs-FAQ ()
440 "Display the Emacs Frequently Asked Questions (FAQ) file." 434 "Display the Emacs Frequently Asked Questions (FAQ) file."
@@ -445,7 +439,17 @@ is specified by the variable `message-log-max'."
445(defun view-emacs-problems () 439(defun view-emacs-problems ()
446 "Display info on known problems with Emacs and possible workarounds." 440 "Display info on known problems with Emacs and possible workarounds."
447 (interactive) 441 (interactive)
448 (view-file (expand-file-name "PROBLEMS" data-directory))) 442 (view-help-file "PROBLEMS"))
443
444(defun view-emacs-debugging ()
445 "Display info on how to debug Emacs problems."
446 (interactive)
447 (view-help-file "DEBUG"))
448
449(defun view-external-packages ()
450 "Display external packages and information about Emacs."
451 (interactive)
452 (view-help-file "MORE.STUFF"))
449 453
450(defun view-lossage () 454(defun view-lossage ()
451 "Display last 100 input keystrokes. 455 "Display last 100 input keystrokes.