mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 09:14:18 +00:00
; Add t as a possible value for 'completion-preview-commands'
* lisp/completion-preview.el (completion-preview-commands): Allow the value t, which says that completion preview should be attempted after any command. * lisp/completion-preview.el (completion-preview-require-certain-commands): Adapt.
This commit is contained in:
parent
47b48346a3
commit
048e9553a8
1 changed files with 8 additions and 3 deletions
|
|
@ -159,8 +159,12 @@ first candidate, and you can cycle between the candidates with
|
||||||
completion-preview-complete
|
completion-preview-complete
|
||||||
completion-preview-insert-word
|
completion-preview-insert-word
|
||||||
completion-preview-insert-sexp)
|
completion-preview-insert-sexp)
|
||||||
"List of commands that should trigger completion preview."
|
"List of commands that should trigger completion preview.
|
||||||
:type '(repeat (function :tag "Command" :value self-insert-command))
|
This can also be t instead of a list of commands, which says that any
|
||||||
|
command can trigger completion preview."
|
||||||
|
:type '(choice (repeat :tag "Specific commands"
|
||||||
|
(function :tag "Command" :value self-insert-command))
|
||||||
|
(const :tag "Any command" t))
|
||||||
:version "30.1")
|
:version "30.1")
|
||||||
|
|
||||||
(defcustom completion-preview-minimum-symbol-length 3
|
(defcustom completion-preview-minimum-symbol-length 3
|
||||||
|
|
@ -334,7 +338,8 @@ Completion Preview mode avoids updating the preview after these commands.")
|
||||||
|
|
||||||
(defsubst completion-preview-require-certain-commands ()
|
(defsubst completion-preview-require-certain-commands ()
|
||||||
"Check if `this-command' is one of `completion-preview-commands'."
|
"Check if `this-command' is one of `completion-preview-commands'."
|
||||||
(memq this-command completion-preview-commands))
|
(or (eq completion-preview-commands t)
|
||||||
|
(memq this-command completion-preview-commands)))
|
||||||
|
|
||||||
(defun completion-preview-require-minimum-symbol-length ()
|
(defun completion-preview-require-minimum-symbol-length ()
|
||||||
"Check if the length of symbol at point is at least above a certain threshold.
|
"Check if the length of symbol at point is at least above a certain threshold.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue