[Eglot] Stricter "expand common" behavior
authorDmitry Gutov <dmitry@gutov.dev>
Sun, 25 Aug 2024 15:23:51 +0000 (18:23 +0300)
committerDmitry Gutov <dmitry@gutov.dev>
Sun, 25 Aug 2024 15:23:51 +0000 (18:23 +0300)
commit713069dd7a87cff8388c25f1bc2c2c1b5217b1ca
tree24834f22583d6c7c7b8c3b4fcb42cc99cdc6175c
parent096730510cdf8c582972f68afeef3226ee5810ca
[Eglot] Stricter "expand common" behavior

* lisp/progmodes/eglot.el (eglot--dumb-tryc): Check that the
expanded string matches every completion strictly (bug#72705).
And in the fallback case, check whether the table matches the
original prefix at all.  Return nil otherwise.

* test/lisp/progmodes/eglot-tests.el
(eglot-test-stop-completion-on-nonprefix)
(eglot-test-try-completion-nomatch): Corresponding tests.

* etc/EGLOT-NEWS: New entry.
etc/EGLOT-NEWS
lisp/progmodes/eglot.el
test/lisp/progmodes/eglot-tests.el