From a7d51676f140c88b534af98be68fbeafcec2fa15 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 21 Sep 2021 19:43:03 +0200 Subject: [PATCH] Document completions-detailed * doc/emacs/help.texi (Name Help): Document completions-detailed. * lisp/minibuffer.el (completions-detailed): Give an example in the doc string. --- doc/emacs/help.texi | 8 ++++++++ etc/NEWS | 1 + lisp/minibuffer.el | 5 +++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi index 9f6009b321e..4ee302fbf7d 100644 --- a/doc/emacs/help.texi +++ b/doc/emacs/help.texi @@ -319,6 +319,14 @@ variable, or a face. If the symbol has more than one definition, like it has both definition as a function and as a variable, this command will show the documentation of all of them, one after the other. +@vindex completions-detailed + If the @code{completions-detailed} user option is non-@code{nil}, +some commands provide details about the possible values when +displaying completions. For instance, @kbd{C-h o TAB} will then +include the first line of the doc string, and will also say whether +each symbol is a function or a variable (and so on). Which details +are included varies depending on the command used. + @node Apropos @section Apropos @cindex apropos diff --git a/etc/NEWS b/etc/NEWS index 89e9d9add77..775d35fe97d 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -174,6 +174,7 @@ completion list popped up by 'M-x' shows the key bindings for all the commands shown in the list of candidate completions that have a key binding. ++++ ** New user option 'completions-detailed'. When non-nil, some commands like 'describe-symbol' show more detailed completions with more information in completion prefix and suffix. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index b5c0054a3c2..7b82e120f19 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -1824,8 +1824,9 @@ in one column." (defcustom completions-detailed nil "When non-nil, display completions with details added as prefix/suffix. -Some commands might provide a detailed view with more information prepended -or appended to completions." +This makes some commands (for instance, \\[describe-symbol]) provide a +detailed view with more information prepended or appended to +completions." :type 'boolean :version "28.1") -- 2.39.5