Subject: Re: bug#55491: All completion fragments get added to obarray

From: Dmitry Gutov <[email-masked]>
Date: Sat, 4 Jun 2022 20:59:47 +0300

On 20.05.2022 03:03, Lars Ingebrigtsen wrote:
> And that's unnecessary -- we don't actually need the fun-sym; we're just
> checking whether we're looking at `ignore-error'.  So I've now fixed
> this in Emacs 29.
> 
> Note that completion in emacs-lisp-mode may still intern stuff, but not
> as gratuitously as before.

Should we try to remove the last 'read' call on line 700? Like this.

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 77bf3f1ed1..0130c002da 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -697,7 +697,8 @@ elisp-completion-at-point
                                      (let ((c (char-after)))
                                        (if (eq c ?\() ?\(
                                          (if (memq (char-syntax c) '(?w ?_))
-                                             (read (current-buffer))))))
+                                             (and (looking-at "\\(?:\\sw\\|\\s_\\)+")
+                                                  (intern-soft (match-string 0)))))))
                             (error nil))))
                      (pcase parent
                        ;; FIXME: Rather than hardcode special cases here,