diff options
| -rw-r--r-- | doc/emacs/mini.texi | 49 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 25 | ||||
| -rw-r--r-- | etc/NEWS | 27 | ||||
| -rw-r--r-- | lisp/minibuffer.el | 25 |
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 | |||
| 628 | shows the completion list buffer on the second attempt to complete. | 628 | shows the completion list buffer on the second attempt to complete. |
| 629 | In other words, if there is nothing to complete, the first @key{TAB} | 629 | In other words, if there is nothing to complete, the first @key{TAB} |
| 630 | echoes @samp{Next char not unique}; the second @key{TAB} shows the | 630 | echoes @samp{Next char not unique}; the second @key{TAB} shows the |
| 631 | completion list buffer. With the previous values and the default | 631 | completion list buffer. If the value is @code{always}, the completion |
| 632 | @code{t} the completions are hidden when some unique completion is | 632 | list buffer is always shown when completion is attempted. |
| 633 | executed. If @code{completion-auto-help} is set to @code{always}, the | 633 | |
| 634 | completion commands are always shown after a completion attempt, or | 634 | The display of the completion list buffer after it is shown for the |
| 635 | updated if they are already visible. If the value is @code{visible}, | 635 | first time is also controlled by @code{completion-auto-help}. If the |
| 636 | then completions are not hidden, but updated if they are already | 636 | value is @code{t} or @code{lazy}, the window showing the completions |
| 637 | visible while the current behavior stays the same as default if they | 637 | pops down when Emacs is able to complete (and may pop up again if |
| 638 | are not. | 638 | Emacs is again unable to complete after you type some more text); if |
| 639 | the value is @code{always}, the window pops down only when you exit | ||
| 640 | the 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 | ||
| 642 | completion list buffer, and like @code{always} when it decides whether | ||
| 643 | to 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 | |||
| 668 | Reference Manual}). | 673 | Reference Manual}). |
| 669 | 674 | ||
| 670 | @vindex completions-header-format | 675 | @vindex completions-header-format |
| 671 | The variable @code{completions-header-format} is a formatted string to | 676 | The variable @code{completions-header-format} is a format spec string to |
| 672 | control the informative line shown before the completions list of | 677 | control the informative line shown before the completions list of |
| 673 | candidates. It may contain a @code{%s} to show the total number of | 678 | candidates. If it contains a @samp{%s} construct, that get replaced |
| 674 | completions. When it is @code{nil}, the message is totally suppressed. | 679 | by the number of completions shown in the completion list buffer. To |
| 675 | Text properties may be added to change the appearance, some useful | 680 | suppress the display of the heading line, customize this variable to |
| 676 | ones are @code{face} or @code{cursor-intangible} (@pxref{Special | 681 | @code{nil}. The string that is the value of this variable can have |
| 677 | Properties,,Properties with Special Meanings, elisp, The Emacs Lisp | 682 | text properties to change the visual appearance of the heading line; |
| 678 | Reference Manual}). | 683 | some useful properties @code{face} or @code{cursor-intangible} |
| 684 | (@pxref{Special Properties,,Properties with Special Meanings, elisp, | ||
| 685 | The Emacs Lisp Reference Manual}). | ||
| 679 | 686 | ||
| 680 | @vindex completions-highlight-face | 687 | @vindex completions-highlight-face |
| 681 | When @code{completions-highlight-face} is a face name, then the | 688 | When @code{completions-highlight-face} names a face, the current |
| 682 | current completion candidate will be highlighted with that face. The | 689 | completion candidate, the one that will be selected by typing |
| 683 | default 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 | 691 | face. The default value of this variable is |
| 685 | property @code{cursor-face}. | 692 | @code{completions-highlight}; the value is @code{nil} disables this |
| 693 | highlighting. 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)} |
| 3544 | This property is used instead of @code{face} when the mouse is on or | 3544 | This property is used instead of @code{face} when the mouse pointer |
| 3545 | near the character. For this purpose, ``near'' means that all text | 3545 | hovers over the text which has this property. When this happens, the |
| 3546 | between the character and where the mouse is have the same | 3546 | entire stretch of text that has the same @code{mouse-face} property |
| 3547 | @code{mouse-face} property value. | 3547 | value, not just the character under the mouse, is highlighted. |
| 3548 | 3548 | ||
| 3549 | Emacs ignores all face attributes from the @code{mouse-face} property | 3549 | Emacs ignores all face attributes from the @code{mouse-face} property |
| 3550 | that alter the text size (e.g., @code{:height}, @code{:weight}, and | 3550 | that 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)} |
| 3556 | This property is similar to @code{mouse-face}, but the face is used if | 3556 | @findex cursor-face-highlight-mode |
| 3557 | the cursor (instead of mouse) is on or near the character. Near has | 3557 | @vindex cursor-face-highlight-nonselected-window |
| 3558 | the same meaning that in @code{mouse-face} and the highlighting only | 3558 | This property is similar to @code{mouse-face}, but it is used when |
| 3559 | takes effect if the mode @code{cursor-face-highlight-mode} is enabled; | 3559 | point (not the mouse) is inside text that has this property. The |
| 3560 | otherwise no highlighting is performed. When the variable | 3560 | highlighting 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 |
| 3562 | text is highlighted even if the window is not selected that is similar | 3563 | text with this face is highlighted even if the window is not selected, |
| 3563 | to @code{highlight-nonselected-windows} for the region. | 3564 | similarly to what @code{highlight-nonselected-windows} does for the |
| 3565 | region (@pxref{Mark,, The Mark and the Region, emacs, The GNU Emacs | ||
| 3566 | Manual}). | ||
| 3564 | 3567 | ||
| 3565 | @item fontified | 3568 | @item fontified |
| 3566 | @kindex fontified @r{(text property)} | 3569 | @kindex fontified @r{(text property)} |
| @@ -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. |
| 582 | There are two new values to control the way "*Completions*" behave after | 582 | There are two new values to control the way the "*Completions*" buffer |
| 583 | a 'TAB' if completion is not unique. 'always' updates or shows | 583 | behaves after pressing a 'TAB' if completion is not unique. The value |
| 584 | the "*Completions*" buffer after any attempt to complete. 'visual' is | 584 | 'always' updates or shows the "*Completions*" buffer after any attempt |
| 585 | like 'always', but only update the completions if they are already | 585 | to complete. The value 'visual' is like 'always', but only updates |
| 586 | visible. The default value 't' always hides the completion buffer after | 586 | the completions if they are already visible. The default value 't' |
| 587 | some completion is made. | 587 | always 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'. |
| 591 | This option limits the height of the "*Completions*" buffer. | 591 | This 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'. |
| 595 | This is a string to control the message to show before completions. | 595 | This is a string to control the heading line to show in the |
| 596 | It may contain a "%s" to show the total number of completions. If nil no | 596 | "*Completions*" buffer before the list of completions. |
| 597 | completions are shown. | 597 | If it contains "%s", that is replaced with the number of completions. |
| 598 | If 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'. |
| 601 | When this user option is a face name, it highlights the current | 602 | When this user option names a face, the current |
| 602 | candidate in the "*Completions*" buffer with that face. When the | 603 | candidate in the "*Completions*" buffer is highlighted with that face. |
| 603 | value is nil, no highlighting is performed at all. | 604 | The 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. |
| 897 | If the value is t the *Completions* buffer is displayed whenever completion | 897 | If the value is t, the *Completions* buffer is displayed whenever completion |
| 898 | is requested but cannot be done. | 898 | is requested but cannot be done. |
| 899 | If the value is `lazy', the *Completions* buffer is only displayed after | 899 | If the value is `lazy', the *Completions* buffer is only displayed after |
| 900 | the second failed attempt to complete. | 900 | the second failed attempt to complete. |
| 901 | If the value is 'always', the completion commands are always shown | 901 | If the value is 'always', the *Completions* buffer is always shown |
| 902 | after a completion attempt, or updated if they are already visible. | 902 | after a completion attempt, and the list of completions is updated if |
| 903 | If the value is 'visible', then completions are not hidden, but updated | 903 | already visible. |
| 904 | if they are already visible while the current behavior stays the same | 904 | If the value is 'visible', the *Completions* buffer is displayed |
| 905 | as default if they are not." | 905 | whenever completion is requested but cannot be done for the first time, |
| 906 | :type '(choice (const :tag "Disabled" nil) | 906 | but remains visible thereafter, and the list of completions in it is |
| 907 | (const :tag "Enabled legacy" t) | 907 | updated 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 |