diff options
| author | Eli Zaretskii | 2015-11-14 22:02:26 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-11-14 22:02:26 +0200 |
| commit | 278d8c8e6c92729e4a00ae61699bc8f95342ea81 (patch) | |
| tree | b9864d7a125c2ae636b100470f05f1b8e21a724d | |
| parent | 478262d6cc00cd6261a598a38f8530270446a1d2 (diff) | |
| download | emacs-278d8c8e6c92729e4a00ae61699bc8f95342ea81.tar.gz emacs-278d8c8e6c92729e4a00ae61699bc8f95342ea81.zip | |
Document 'describe-symbol'
* doc/emacs/help.texi (Help Summary): Mention "C-h o".
(Name Help): Document "C-h o" and describe-symbol.
* lisp/help-fns.el (describe-symbol): Doc fix.
| -rw-r--r-- | doc/emacs/help.texi | 12 | ||||
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | lisp/help-fns.el | 5 |
3 files changed, 20 insertions, 2 deletions
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index a9c63b91785..8b4adf947ef 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi | |||
| @@ -126,6 +126,10 @@ Display documentation of the current major mode and minor modes | |||
| 126 | (@code{describe-mode}). | 126 | (@code{describe-mode}). |
| 127 | @item C-h n | 127 | @item C-h n |
| 128 | Display news of recent Emacs changes (@code{view-emacs-news}). | 128 | Display news of recent Emacs changes (@code{view-emacs-news}). |
| 129 | @item C-h o @var{symbol} | ||
| 130 | Display documentation of the Lisp symbol named @var{symbol} | ||
| 131 | (@code{describe-symbol}). This will show the documentation of all | ||
| 132 | kinds of symbols: functions, variables, and faces. | ||
| 129 | @item C-h p | 133 | @item C-h p |
| 130 | Find packages by topic keyword (@code{finder-by-keyword}). This lists | 134 | Find packages by topic keyword (@code{finder-by-keyword}). This lists |
| 131 | packages using a package menu buffer. @xref{Packages}. | 135 | packages using a package menu buffer. @xref{Packages}. |
| @@ -272,6 +276,14 @@ source files installed (@pxref{Hyperlinking}). | |||
| 272 | (@code{Info-goto-emacs-command-node}). This knows about various | 276 | (@code{Info-goto-emacs-command-node}). This knows about various |
| 273 | manuals, not just the Emacs manual, and finds the right one. | 277 | manuals, not just the Emacs manual, and finds the right one. |
| 274 | 278 | ||
| 279 | @kindex C-h o | ||
| 280 | @findex describe-symbol | ||
| 281 | @kbd{C-h o} (@code{describe-symbol}) is like @kbd{C-h f} and | ||
| 282 | @kbd{C-h v}, but it describes any symbol, be it a function, a | ||
| 283 | variable, or a face. If the symbol has more than one definition, like | ||
| 284 | it has both definition as a function and as a variable, this command | ||
| 285 | will show the documentation of all of them, one after the other. | ||
| 286 | |||
| 275 | @node Apropos | 287 | @node Apropos |
| 276 | @section Apropos | 288 | @section Apropos |
| 277 | @cindex apropos | 289 | @cindex apropos |
| @@ -121,13 +121,16 @@ the variable `dir-locals-file' for more information. | |||
| 121 | information about mode local overrides (defined by cedet/mode-local.el | 121 | information about mode local overrides (defined by cedet/mode-local.el |
| 122 | `define-overloadable-function' `define-mode-local-overrides'). | 122 | `define-overloadable-function' `define-mode-local-overrides'). |
| 123 | 123 | ||
| 124 | +++ | ||
| 124 | ** New `display-buffer' action function `display-buffer-use-some-frame'. | 125 | ** New `display-buffer' action function `display-buffer-use-some-frame'. |
| 125 | This displays the buffer in an existing frame other than the current | 126 | This displays the buffer in an existing frame other than the current |
| 126 | frame, and allows the caller to specify a frame predicate to exclude | 127 | frame, and allows the caller to specify a frame predicate to exclude |
| 127 | frames. | 128 | frames. |
| 128 | 129 | ||
| 130 | +++ | ||
| 129 | ** New documentation command `describe-symbol'. | 131 | ** New documentation command `describe-symbol'. |
| 130 | Works for functions, variables, faces, etc. | 132 | Works for functions, variables, faces, etc. It is bound to `C-h o' by |
| 133 | default. | ||
| 131 | 134 | ||
| 132 | ** New user option `search-default-regexp-mode' | 135 | ** New user option `search-default-regexp-mode' |
| 133 | specifies the default mode for I-search. | 136 | specifies the default mode for I-search. |
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index e810a26c5a4..41911b8709c 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -997,7 +997,10 @@ file-local variable.\n") | |||
| 997 | ;;;###autoload | 997 | ;;;###autoload |
| 998 | (defun describe-symbol (symbol &optional buffer frame) | 998 | (defun describe-symbol (symbol &optional buffer frame) |
| 999 | "Display the full documentation of SYMBOL. | 999 | "Display the full documentation of SYMBOL. |
| 1000 | Will show the info of SYMBOL as a function, variable, and/or face." | 1000 | Will show the info of SYMBOL as a function, variable, and/or face. |
| 1001 | Optional arguments BUFFER and FRAME specify for which buffer and | ||
| 1002 | frame to show the information about SYMBOL; they default to the | ||
| 1003 | current buffer and the selected frame, respectively." | ||
| 1001 | (interactive | 1004 | (interactive |
| 1002 | (let* ((v-or-f (symbol-at-point)) | 1005 | (let* ((v-or-f (symbol-at-point)) |
| 1003 | (found (cl-some (lambda (x) (funcall (nth 1 x) v-or-f)) | 1006 | (found (cl-some (lambda (x) (funcall (nth 1 x) v-or-f)) |