From 32b3856f850e1721b3be23b50f4b90f9f59fee8a Mon Sep 17 00:00:00 2001 From: Daniel Koning Date: Mon, 22 Jun 2020 19:03:20 -0500 Subject: [PATCH] Use 'emacs-lisp-mode-syntax-table' for reading Lisp expressions * lisp/simple.el (read--expression): Set syntax table to 'emacs-lisp-mode-syntax-table' when reading a Lisp expression from the minibuffer. (Bug#41781) Copyright-paperwork-exempt: yes --- lisp/simple.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index a28d10fd4a5..2f92238e640 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1622,8 +1622,11 @@ display the result of expression evaluation." (let ((minibuffer-completing-symbol t)) (minibuffer-with-setup-hook (lambda () - ;; FIXME: call emacs-lisp-mode (see also - ;; `eldoc--eval-expression-setup')? + ;; FIXME: instead of just applying the syntax table, maybe + ;; use a special major mode tailored to reading Lisp + ;; expressions from the minibuffer? (`emacs-lisp-mode' + ;; doesn't preserve the necessary keybindings.) + (set-syntax-table emacs-lisp-mode-syntax-table) (add-hook 'completion-at-point-functions #'elisp-completion-at-point nil t) (run-hooks 'eval-expression-minibuffer-setup-hook)) -- 2.39.5