unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#47665: elisp-completion-at-point doesn't work when no characters typed
@ 2021-04-08 23:53 Dmitry Gutov
  2021-04-09  2:38 ` Stefan Monnier
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Gutov @ 2021-04-08 23:53 UTC (permalink / raw)
  To: 47665; +Cc: stefan monnier

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.





^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-09 22:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08 23:53 bug#47665: elisp-completion-at-point doesn't work when no characters typed Dmitry Gutov
2021-04-09  2:38 ` Stefan Monnier
2021-04-09 22:52   ` Dmitry Gutov
2021-04-09 22:57     ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).