bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#47665: elisp-completion-at-point doesn't work when no characters typ


From: Dmitry Gutov
Subject: bug#47665: elisp-completion-at-point doesn't work when no characters typed
Date: Fri, 9 Apr 2021 02:53:29 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

X-Debbugs-CC: Stefan Monnier <monnier@IRO.UMontreal.CA>

Example:

(|)

press C-M-i -> nothing

(a|)

press C-M-i -> lots of completions

That's not very conducive to API exploration via completion.

Further, it triggers a problem when used with company: if I initiate completion when prefix is empty, it switches to the dabbrev-code backend. Then, even after I type some chars, the same backend continues to be used. Not company-capf, which I would want.

This patch seems to fix it:

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 8ade718640..203712f45d 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -496,7 +496,7 @@ elisp-completion-at-point
           (end
            (unless (or (eq beg (point-max))
                        (member (char-syntax (char-after beg))
-                                '(?\s ?\" ?\( ?\))))
+                                '(?\" ?\()))
              (condition-case nil
                  (save-excursion
                    (goto-char beg)


But I'm not sure why those elements were there in the first place.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]