aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2022-03-22 19:56:06 +0200
committerEli Zaretskii2022-03-22 19:56:06 +0200
commitf2047fdca4f42cf0af568e1d62f286a91cce6d35 (patch)
tree63747a05afbcd34a913badef451ad2b25ec1d961
parentda3af500ad490db5cded8dfca7f2ec713b52629c (diff)
downloademacs-f2047fdca4f42cf0af568e1d62f286a91cce6d35.tar.gz
emacs-f2047fdca4f42cf0af568e1d62f286a91cce6d35.zip
Fix documentation of the new completion-related features
* etc/NEWS: * lisp/minibuffer.el (completion-auto-help): * doc/lispref/text.texi (Special Properties): * doc/emacs/mini.texi (Completion Options): Fix wording of recently added documentation and customization options.
-rw-r--r--doc/emacs/mini.texi49
-rw-r--r--doc/lispref/text.texi25
-rw-r--r--etc/NEWS27
-rw-r--r--lisp/minibuffer.el25
4 files changed, 71 insertions, 55 deletions
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index 24517262fa6..72a3cf24912 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -628,14 +628,19 @@ commands never display the completion list buffer; you must type
628shows the completion list buffer on the second attempt to complete. 628shows the completion list buffer on the second attempt to complete.
629In other words, if there is nothing to complete, the first @key{TAB} 629In other words, if there is nothing to complete, the first @key{TAB}
630echoes @samp{Next char not unique}; the second @key{TAB} shows the 630echoes @samp{Next char not unique}; the second @key{TAB} shows the
631completion list buffer. With the previous values and the default 631completion list buffer. If the value is @code{always}, the completion
632@code{t} the completions are hidden when some unique completion is 632list buffer is always shown when completion is attempted.
633executed. If @code{completion-auto-help} is set to @code{always}, the 633
634completion commands are always shown after a completion attempt, or 634The display of the completion list buffer after it is shown for the
635updated if they are already visible. If the value is @code{visible}, 635first time is also controlled by @code{completion-auto-help}. If the
636then completions are not hidden, but updated if they are already 636value is @code{t} or @code{lazy}, the window showing the completions
637visible while the current behavior stays the same as default if they 637pops down when Emacs is able to complete (and may pop up again if
638are not. 638Emacs is again unable to complete after you type some more text); if
639the value is @code{always}, the window pops down only when you exit
640the completion. The value @code{visible} is a hybrid: it behaves like
641@code{t} when it decides whether to pop up the window showing the
642completion list buffer, and like @code{always} when it decides whether
643to pop it down.
639 644
640@vindex completion-cycle-threshold 645@vindex completion-cycle-threshold
641 If @code{completion-cycle-threshold} is non-@code{nil}, completion 646 If @code{completion-cycle-threshold} is non-@code{nil}, completion
@@ -668,21 +673,25 @@ Alists,,Action Alists for Buffer Display, elisp, The Emacs Lisp
668Reference Manual}). 673Reference Manual}).
669 674
670@vindex completions-header-format 675@vindex completions-header-format
671The variable @code{completions-header-format} is a formatted string to 676The variable @code{completions-header-format} is a format spec string to
672control the informative line shown before the completions list of 677control the informative line shown before the completions list of
673candidates. It may contain a @code{%s} to show the total number of 678candidates. If it contains a @samp{%s} construct, that get replaced
674completions. When it is @code{nil}, the message is totally suppressed. 679by the number of completions shown in the completion list buffer. To
675Text properties may be added to change the appearance, some useful 680suppress the display of the heading line, customize this variable to
676ones are @code{face} or @code{cursor-intangible} (@pxref{Special 681@code{nil}. The string that is the value of this variable can have
677Properties,,Properties with Special Meanings, elisp, The Emacs Lisp 682text properties to change the visual appearance of the heading line;
678Reference Manual}). 683some useful properties @code{face} or @code{cursor-intangible}
684(@pxref{Special Properties,,Properties with Special Meanings, elisp,
685The Emacs Lisp Reference Manual}).
679 686
680@vindex completions-highlight-face 687@vindex completions-highlight-face
681When @code{completions-highlight-face} is a face name, then the 688When @code{completions-highlight-face} names a face, the current
682current completion candidate will be highlighted with that face. The 689completion candidate, the one that will be selected by typing
683default value is @code{completions-highlight}. When the value is 690@kbd{@key}RET}} or clicking the mouse, will be highlighted using that
684@code{nil}, no highlighting is performed. This feature sets the text 691face. The default value of this variable is
685property @code{cursor-face}. 692@code{completions-highlight}; the value is @code{nil} disables this
693highlighting. This feature uses the special text property
694@code{cursor-face}.
686 695
687@node Minibuffer History 696@node Minibuffer History
688@section Minibuffer History 697@section Minibuffer History
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index edb75b453c8..f76512c5a0b 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -3541,10 +3541,10 @@ special modes that implement their own highlighting.
3541 3541
3542@item mouse-face 3542@item mouse-face
3543@kindex mouse-face @r{(text property)} 3543@kindex mouse-face @r{(text property)}
3544This property is used instead of @code{face} when the mouse is on or 3544This property is used instead of @code{face} when the mouse pointer
3545near the character. For this purpose, ``near'' means that all text 3545hovers over the text which has this property. When this happens, the
3546between the character and where the mouse is have the same 3546entire stretch of text that has the same @code{mouse-face} property
3547@code{mouse-face} property value. 3547value, not just the character under the mouse, is highlighted.
3548 3548
3549Emacs ignores all face attributes from the @code{mouse-face} property 3549Emacs ignores all face attributes from the @code{mouse-face} property
3550that alter the text size (e.g., @code{:height}, @code{:weight}, and 3550that alter the text size (e.g., @code{:height}, @code{:weight}, and
@@ -3553,14 +3553,17 @@ unhighlighted text.
3553 3553
3554@item cursor-face 3554@item cursor-face
3555@kindex cursor-face @r{(text property)} 3555@kindex cursor-face @r{(text property)}
3556This property is similar to @code{mouse-face}, but the face is used if 3556@findex cursor-face-highlight-mode
3557the cursor (instead of mouse) is on or near the character. Near has 3557@vindex cursor-face-highlight-nonselected-window
3558the same meaning that in @code{mouse-face} and the highlighting only 3558This property is similar to @code{mouse-face}, but it is used when
3559takes effect if the mode @code{cursor-face-highlight-mode} is enabled; 3559point (not the mouse) is inside text that has this property. The
3560otherwise no highlighting is performed. When the variable 3560highlighting happens only if the mode
3561@code{cursor-face-highlight-mode} is enabled. When the variable
3561@code{cursor-face-highlight-nonselected-window} is non-@code{nil}, the 3562@code{cursor-face-highlight-nonselected-window} is non-@code{nil}, the
3562text is highlighted even if the window is not selected that is similar 3563text with this face is highlighted even if the window is not selected,
3563to @code{highlight-nonselected-windows} for the region. 3564similarly to what @code{highlight-nonselected-windows} does for the
3565region (@pxref{Mark,, The Mark and the Region, emacs, The GNU Emacs
3566Manual}).
3564 3567
3565@item fontified 3568@item fontified
3566@kindex fontified @r{(text property)} 3569@kindex fontified @r{(text property)}
diff --git a/etc/NEWS b/etc/NEWS
index e64fe2d23bd..abee5fcb992 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -579,28 +579,29 @@ alphabetical (the default), or a custom sort function.
579 579
580+++ 580+++
581*** New values for the 'completion-auto-help' user option. 581*** New values for the 'completion-auto-help' user option.
582There are two new values to control the way "*Completions*" behave after 582There are two new values to control the way the "*Completions*" buffer
583a 'TAB' if completion is not unique. 'always' updates or shows 583behaves after pressing a 'TAB' if completion is not unique. The value
584the "*Completions*" buffer after any attempt to complete. 'visual' is 584'always' updates or shows the "*Completions*" buffer after any attempt
585like 'always', but only update the completions if they are already 585to complete. The value 'visual' is like 'always', but only updates
586visible. The default value 't' always hides the completion buffer after 586the completions if they are already visible. The default value 't'
587some completion is made. 587always hides the completion buffer after some completion is made.
588 588
589+++ 589+++
590*** New user option 'completions-max-height'. 590*** New user option 'completions-max-height'.
591This option limits the height of the "*Completions*" buffer. 591This option limits the height of the "*Completions*" buffer.
592 592
593+++ 593+++
594*** New user option 'completions-header-format' 594*** New user option 'completions-header-format'.
595This is a string to control the message to show before completions. 595This is a string to control the heading line to show in the
596It may contain a "%s" to show the total number of completions. If nil no 596"*Completions*" buffer before the list of completions.
597completions are shown. 597If it contains "%s", that is replaced with the number of completions.
598If nil, the heading line is not shown.
598 599
599+++ 600+++
600*** New user option 'completions-highlight-face'. 601*** New user option 'completions-highlight-face'.
601When this user option is a face name, it highlights the current 602When this user option names a face, the current
602candidate in the "*Completions*" buffer with that face. When the 603candidate in the "*Completions*" buffer is highlighted with that face.
603value is nil, no highlighting is performed at all. 604The nil value disables this highlighting.
604 605
605** Isearch and Replace 606** Isearch and Replace
606 607
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 00d4560865c..c4fb1c00391 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -894,20 +894,23 @@ If the current buffer is not a minibuffer, erase its entire contents."
894 894
895(defcustom completion-auto-help t 895(defcustom completion-auto-help t
896 "Non-nil means automatically provide help for invalid completion input. 896 "Non-nil means automatically provide help for invalid completion input.
897If the value is t the *Completions* buffer is displayed whenever completion 897If the value is t, the *Completions* buffer is displayed whenever completion
898is requested but cannot be done. 898is requested but cannot be done.
899If the value is `lazy', the *Completions* buffer is only displayed after 899If the value is `lazy', the *Completions* buffer is only displayed after
900the second failed attempt to complete. 900the second failed attempt to complete.
901If the value is 'always', the completion commands are always shown 901If the value is 'always', the *Completions* buffer is always shown
902after a completion attempt, or updated if they are already visible. 902after a completion attempt, and the list of completions is updated if
903If the value is 'visible', then completions are not hidden, but updated 903already visible.
904if they are already visible while the current behavior stays the same 904If the value is 'visible', the *Completions* buffer is displayed
905as default if they are not." 905whenever completion is requested but cannot be done for the first time,
906 :type '(choice (const :tag "Disabled" nil) 906but remains visible thereafter, and the list of completions in it is
907 (const :tag "Enabled legacy" t) 907updated for subsequent attempts to complete.."
908 (const :tag "After a second attempt" lazy) 908 :type '(choice (const :tag "Don't show" nil)
909 (const :tag "Visible update" visible) 909 (const :tag "Show only when cannot complete" t)
910 (const :tag "Always update" always))) 910 (const :tag "Show after second failed completion attempt" lazy)
911 (const :tag
912 "Leave visible after first failed completion" visible)
913 (const :tag "Always visible" always)))
911 914
912(defvar completion-styles-alist 915(defvar completion-styles-alist
913 '((emacs21 916 '((emacs21