From: Dmitry Gutov <dgutov@yandex.ru>
Date: Sat, 11 Jun 2022 00:45:46 +0000 (+0300)
Subject: elisp-completion-at-point: Replace last usage of 'read'
X-Git-Tag: emacs-29.0.90~1910^2~89
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cb0c697e21f710cb8df56c33d951f780a2a1e40e;p=emacs.git

elisp-completion-at-point: Replace last usage of 'read'

* lisp/progmodes/elisp-mode.el (elisp-completion-at-point):
Replace the last remaining usage of 'read' (bug#55491).
---

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 77bf3f1ed18..5989e1161b5 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -697,7 +697,10 @@ functions are annotated with \"<f>\" via the
                                      (let ((c (char-after)))
                                        (if (eq c ?\() ?\(
                                          (if (memq (char-syntax c) '(?w ?_))
-                                             (read (current-buffer))))))
+                                             (let ((pt (point)))
+                                               (forward-sexp)
+                                               (intern-soft
+                                                (buffer-substring pt (point))))))))
                             (error nil))))
                      (pcase parent
                        ;; FIXME: Rather than hardcode special cases here,