aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorEshel Yaron2024-04-12 22:41:10 +0200
committerEshel Yaron2024-04-20 14:32:00 +0300
commit00caec805810c752f0015c2ca23a494621e63046 (patch)
treead4974dc1a0323dfddda78f7b3780422f5b7aa43 /java
parent12cd8d26151907f8721f0cfe36e26294ab653708 (diff)
downloademacs-00caec805810c752f0015c2ca23a494621e63046.tar.gz
emacs-00caec805810c752f0015c2ca23a494621e63046.zip
New command 'completion-preview-complete'
This command completes the symbol at point up to the longest common prefix of all completions candidates. We also add an indication of the longest common prefix in the completion preview by highlighting that part of the preview with the 'completion-preview-exact' face. To facilitate these features we change the way we store the completion candidates while the preview is visible, to explicitly keep the common prefix along with a list of its suffixes. * lisp/completion-preview.el (completion-preview--try-table): Return longest common prefix and list of suffixes instead of list of full candidates. Add illustrative comment. (completion-preview--capf-wrapper, completion-preview--update) (completion-preview--show, completion-preview-insert) (completion-preview-next-candidate): Adjust. (completion-preview-common): New face. (completion-preview-exact): Tweak to distinguish it from 'completion-preview-common'. (completion-preview-complete): New command. (completion-preview-active-mode-map): Bind it. (completion-preview-mode): Mention it in docstring. (completion-preview-commands): Add 'completion-preview-complete'. (completion-preview--make-overlay): Simplify. (completion-preview--internal-command-p): Remove. (completion-preview-require-certain-commands): Update. (completion-preview--inhibit-update): New inline function. (completion-preview--inhibit-update-p): New local variable. (completion-preview--post-command, completion-preview-hide): Reset it to nil. * test/lisp/completion-preview-tests.el (completion-preview-tests--check-preview): Check the 'face' property of both the first and last character. Update callers. (completion-preview-insert-calls-exit-function) (completion-preview-complete): New tests. (Bug#70381)
Diffstat (limited to 'java')
0 files changed, 0 insertions, 0 deletions