emacs-diffs
[Top][All Lists]
Advanced

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

master 9e338b7456: Make completion in emacs-lisp-mode intern fewer symbo


From: Lars Ingebrigtsen
Subject: master 9e338b7456: Make completion in emacs-lisp-mode intern fewer symbols
Date: Thu, 19 May 2022 20:04:28 -0400 (EDT)

branch: master
commit 9e338b7456f652259d944d9973fe1790079dbb13
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Make completion in emacs-lisp-mode intern fewer symbols
    
    * lisp/progmodes/elisp-mode.el (elisp-completion-at-point): Don't
    intern the string before point just to check whether we're looking
    at `ignore-error' (bug#55491).
---
 lisp/progmodes/elisp-mode.el | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 37fd4fdb3c..70826b4c3a 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -627,13 +627,13 @@ functions are annotated with \"<f>\" via the
            ;; t if in function position.
            (funpos (eq (char-before beg) ?\())
            (quoted (elisp--form-quoted-p beg))
-           (fun-sym (condition-case nil
-                        (save-excursion
-                          (up-list -1)
-                          (forward-char 1)
-                          (and (memq (char-syntax (char-after)) '(?w ?_))
-                               (read (current-buffer))))
-                      (error nil))))
+           (is-ignore-error
+            (condition-case nil
+                (save-excursion
+                  (up-list -1)
+                  (forward-char 1)
+                  (looking-at-p "ignore-error\\>"))
+              (error nil))))
       (when (and end (or (not (nth 8 (syntax-ppss)))
                          (memq (char-before beg) '(?` ?‘))))
         (let ((table-etc
@@ -642,7 +642,7 @@ functions are annotated with \"<f>\" via the
                     ;; FIXME: We could look at the first element of
                     ;; the current form and use it to provide a more
                     ;; specific completion table in more cases.
-                    ((eq fun-sym 'ignore-error)
+                    (is-ignore-error
                      (list t (elisp--completion-local-symbols)
                            :predicate (lambda (sym)
                                         (get sym 'error-conditions))))



reply via email to

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