aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2015-11-14 22:02:26 +0200
committerEli Zaretskii2015-11-14 22:02:26 +0200
commit278d8c8e6c92729e4a00ae61699bc8f95342ea81 (patch)
treeb9864d7a125c2ae636b100470f05f1b8e21a724d
parent478262d6cc00cd6261a598a38f8530270446a1d2 (diff)
downloademacs-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.texi12
-rw-r--r--etc/NEWS5
-rw-r--r--lisp/help-fns.el5
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
128Display news of recent Emacs changes (@code{view-emacs-news}). 128Display news of recent Emacs changes (@code{view-emacs-news}).
129@item C-h o @var{symbol}
130Display documentation of the Lisp symbol named @var{symbol}
131(@code{describe-symbol}). This will show the documentation of all
132kinds of symbols: functions, variables, and faces.
129@item C-h p 133@item C-h p
130Find packages by topic keyword (@code{finder-by-keyword}). This lists 134Find packages by topic keyword (@code{finder-by-keyword}). This lists
131packages using a package menu buffer. @xref{Packages}. 135packages 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
273manuals, not just the Emacs manual, and finds the right one. 277manuals, 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
283variable, or a face. If the symbol has more than one definition, like
284it has both definition as a function and as a variable, this command
285will 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
diff --git a/etc/NEWS b/etc/NEWS
index 6608b795f8b..9793d5ee720 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -121,13 +121,16 @@ the variable `dir-locals-file' for more information.
121information about mode local overrides (defined by cedet/mode-local.el 121information 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'.
125This displays the buffer in an existing frame other than the current 126This displays the buffer in an existing frame other than the current
126frame, and allows the caller to specify a frame predicate to exclude 127frame, and allows the caller to specify a frame predicate to exclude
127frames. 128frames.
128 129
130+++
129** New documentation command `describe-symbol'. 131** New documentation command `describe-symbol'.
130Works for functions, variables, faces, etc. 132Works for functions, variables, faces, etc. It is bound to `C-h o' by
133default.
131 134
132** New user option `search-default-regexp-mode' 135** New user option `search-default-regexp-mode'
133specifies the default mode for I-search. 136specifies 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.
1000Will show the info of SYMBOL as a function, variable, and/or face." 1000Will show the info of SYMBOL as a function, variable, and/or face.
1001Optional arguments BUFFER and FRAME specify for which buffer and
1002frame to show the information about SYMBOL; they default to the
1003current 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))