>From 1d4ed0e89b4ebc040609b7476128062685843c7f Mon Sep 17 00:00:00 2001 From: Daniel Koning Date: Tue, 9 Jun 2020 19:24:11 -0500 Subject: [PATCH] lisp/progmodes/elisp-mode.el (elisp--current-symbol): Set syntax table. Even if `elisp-current-symbol' is called from a buffer with a different active syntax table (such as the minibuffer in `read-from-minibuffer'), use `emacs-lisp-mode-syntax-table' to determine the symbol boundaries. Copyright-paperwork-exempt: yes --- lisp/progmodes/elisp-mode.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index f39ecf9b7b..65c01b2ce1 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -1615,10 +1615,11 @@ elisp--beginning-of-sexp ;; returns nil unless current word is an interned symbol. (defun elisp--current-symbol () - (let ((c (char-after (point)))) - (and c - (memq (char-syntax c) '(?w ?_)) - (intern-soft (current-word))))) + (with-syntax-table emacs-lisp-mode-syntax-table + (let ((c (char-after (point)))) + (and c + (memq (char-syntax c) '(?w ?_)) + (intern-soft (current-word)))))) (defun elisp-function-argstring (arglist) "Return ARGLIST as a string enclosed by (). -- 2.20.1