Mercurial > emacs
comparison lispref/help.texi @ 49600:23a1cea22d13
Trailing whitespace deleted.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Tue, 04 Feb 2003 14:56:31 +0000 |
parents | 68b26e98aef6 |
children | 695cf19ef79e d7ddb3e565de |
comparison
equal
deleted
inserted
replaced
49599:5ade352e8d1c | 49600:23a1cea22d13 |
---|---|
1 @c -*-texinfo-*- | 1 @c -*-texinfo-*- |
2 @c This is part of the GNU Emacs Lisp Reference Manual. | 2 @c This is part of the GNU Emacs Lisp Reference Manual. |
3 @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999 | 3 @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999 |
4 @c Free Software Foundation, Inc. | 4 @c Free Software Foundation, Inc. |
5 @c See the file elisp.texi for copying conditions. | 5 @c See the file elisp.texi for copying conditions. |
6 @setfilename ../info/help | 6 @setfilename ../info/help |
7 @node Documentation, Files, Modes, Top | 7 @node Documentation, Files, Modes, Top |
8 @chapter Documentation | 8 @chapter Documentation |
9 @cindex documentation strings | 9 @cindex documentation strings |
162 "Describe the Emacs Lisp symbols matching PATTERN. | 162 "Describe the Emacs Lisp symbols matching PATTERN. |
163 All symbols that have PATTERN in their name are described | 163 All symbols that have PATTERN in their name are described |
164 in the `*Help*' buffer." | 164 in the `*Help*' buffer." |
165 (interactive "sDescribe symbols matching: ") | 165 (interactive "sDescribe symbols matching: ") |
166 (let ((describe-func | 166 (let ((describe-func |
167 (function | 167 (function |
168 (lambda (s) | 168 (lambda (s) |
169 @end group | 169 @end group |
170 @group | 170 @group |
171 ;; @r{Print description of symbol.} | 171 ;; @r{Print description of symbol.} |
172 (if (fboundp s) ; @r{It is a function.} | 172 (if (fboundp s) ; @r{It is a function.} |
173 (princ | 173 (princ |
174 (format "%s\t%s\n%s\n\n" s | 174 (format "%s\t%s\n%s\n\n" s |
175 (if (commandp s) | 175 (if (commandp s) |
176 (let ((keys (where-is-internal s))) | 176 (let ((keys (where-is-internal s))) |
177 (if keys | 177 (if keys |
178 (concat | 178 (concat |
179 "Keys: " | 179 "Keys: " |
180 (mapconcat 'key-description | 180 (mapconcat 'key-description |
181 keys " ")) | 181 keys " ")) |
182 "Keys: none")) | 182 "Keys: none")) |
183 "Function") | 183 "Function") |
184 @end group | 184 @end group |
185 @group | 185 @group |
186 (or (documentation s) | 186 (or (documentation s) |
187 "not documented")))) | 187 "not documented")))) |
188 | 188 |
189 (if (boundp s) ; @r{It is a variable.} | 189 (if (boundp s) ; @r{It is a variable.} |
190 @end group | 190 @end group |
191 @group | 191 @group |
192 (princ | 192 (princ |
193 (format "%s\t%s\n%s\n\n" s | 193 (format "%s\t%s\n%s\n\n" s |
194 (if (user-variable-p s) | 194 (if (user-variable-p s) |
195 "Option " "Variable") | 195 "Option " "Variable") |
196 @end group | 196 @end group |
197 @group | 197 @group |
198 (or (documentation-property | 198 (or (documentation-property |
199 s 'variable-documentation) | 199 s 'variable-documentation) |
200 "not documented"))))))) | 200 "not documented"))))))) |
201 sym-list) | 201 sym-list) |
202 @end group | 202 @end group |
203 | 203 |
204 @group | 204 @group |
205 ;; @r{Build a list of symbols that match pattern.} | 205 ;; @r{Build a list of symbols that match pattern.} |
206 (mapatoms (function | 206 (mapatoms (function |
207 (lambda (sym) | 207 (lambda (sym) |
208 (if (string-match pattern (symbol-name sym)) | 208 (if (string-match pattern (symbol-name sym)) |
209 (setq sym-list (cons sym sym-list)))))) | 209 (setq sym-list (cons sym sym-list)))))) |
210 @end group | 210 @end group |
211 | 211 |
223 @smallexample | 223 @smallexample |
224 @group | 224 @group |
225 (describe-symbols "goal") | 225 (describe-symbols "goal") |
226 | 226 |
227 ---------- Buffer: *Help* ---------- | 227 ---------- Buffer: *Help* ---------- |
228 goal-column Option | 228 goal-column Option |
229 *Semipermanent goal column for vertical motion, as set by @dots{} | 229 *Semipermanent goal column for vertical motion, as set by @dots{} |
230 @end group | 230 @end group |
231 @c Do not blithely break or fill these lines. | 231 @c Do not blithely break or fill these lines. |
232 @c That makes them incorrect. | 232 @c That makes them incorrect. |
233 | 233 |
304 @table @code | 304 @table @code |
305 @item \[@var{command}] | 305 @item \[@var{command}] |
306 stands for a key sequence that will invoke @var{command}, or @samp{M-x | 306 stands for a key sequence that will invoke @var{command}, or @samp{M-x |
307 @var{command}} if @var{command} has no key bindings. | 307 @var{command}} if @var{command} has no key bindings. |
308 | 308 |
309 @item \@{@var{mapvar}@} | 309 @item \@{@var{mapvar}@} |
310 stands for a summary of the keymap which is the value of the variable | 310 stands for a summary of the keymap which is the value of the variable |
311 @var{mapvar}. The summary is made using @code{describe-bindings}. | 311 @var{mapvar}. The summary is made using @code{describe-bindings}. |
312 | 312 |
313 @item \<@var{mapvar}> | 313 @item \<@var{mapvar}> |
314 stands for no text itself. It is used only for a side effect: it | 314 stands for no text itself. It is used only for a side effect: it |
315 specifies @var{mapvar}'s value as the keymap for any following | 315 specifies @var{mapvar}'s value as the keymap for any following |
316 @samp{\[@var{command}]} sequences in this documentation string. | 316 @samp{\[@var{command}]} sequences in this documentation string. |
317 | 317 |
318 @item \= | 318 @item \= |
333 | 333 |
334 Here are examples of the special sequences: | 334 Here are examples of the special sequences: |
335 | 335 |
336 @smallexample | 336 @smallexample |
337 @group | 337 @group |
338 (substitute-command-keys | 338 (substitute-command-keys |
339 "To abort recursive edit, type: \\[abort-recursive-edit]") | 339 "To abort recursive edit, type: \\[abort-recursive-edit]") |
340 @result{} "To abort recursive edit, type: C-]" | 340 @result{} "To abort recursive edit, type: C-]" |
341 @end group | 341 @end group |
342 | 342 |
343 @group | 343 @group |
344 (substitute-command-keys | 344 (substitute-command-keys |
345 "The keys that are defined for the minibuffer here are: | 345 "The keys that are defined for the minibuffer here are: |
346 \\@{minibuffer-local-must-match-map@}") | 346 \\@{minibuffer-local-must-match-map@}") |
347 @result{} "The keys that are defined for the minibuffer here are: | 347 @result{} "The keys that are defined for the minibuffer here are: |
348 @end group | 348 @end group |
349 | 349 |
603 Emacs versions, @code{exec-directory} was used for this. | 603 Emacs versions, @code{exec-directory} was used for this. |
604 @end defvar | 604 @end defvar |
605 | 605 |
606 @c Emacs 19 feature | 606 @c Emacs 19 feature |
607 @defmac make-help-screen fname help-line help-text help-map | 607 @defmac make-help-screen fname help-line help-text help-map |
608 This macro defines a help command named @var{fname} that acts like a | 608 This macro defines a help command named @var{fname} that acts like a |
609 prefix key that shows a list of the subcommands it offers. | 609 prefix key that shows a list of the subcommands it offers. |
610 | 610 |
611 When invoked, @var{fname} displays @var{help-text} in a window, then | 611 When invoked, @var{fname} displays @var{help-text} in a window, then |
612 reads and executes a key sequence according to @var{help-map}. The | 612 reads and executes a key sequence according to @var{help-map}. The |
613 string @var{help-text} should describe the bindings available in | 613 string @var{help-text} should describe the bindings available in |