]> git.eshelyaron.com Git - emacs.git/commit
Allow 'completion-preview-require-minimum-symbol-length' to be nil
authorEshel Yaron <me@eshelyaron.com>
Wed, 5 Jun 2024 08:03:06 +0000 (10:03 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 5 Jun 2024 10:15:51 +0000 (12:15 +0200)
commiteb622a3f66e9d14722fc8cce43cc283b03aa7f79
tree4a1cce424795c527e99067ef219691362ba39b4c
parent33206dee65c3fe2725e6348953677bc059b3239d
Allow 'completion-preview-require-minimum-symbol-length' to be nil

With some completion backends, completion preview is useful not only
after a partial symbol, but also after punctuation and other non-symbol
characters.  For example, in C code it's helpful to display the
completion preview for struct members when point is after 'foo->'.
Provide an option to skip the check for minimum symbol length at point
in order to support this use case.

* lisp/completion-preview.el
(completion-preview-minimum-symbol-length): Mention possible nil
value in type and docstring.
(completion-preview-require-minimum-symbol-length): Skip check
if 'completion-preview-minimum-symbol-length' is nil.

(cherry picked from commit c11fe940064724e5c41af20fdb0f60c49952f936)
lisp/completion-preview.el