Allow overriding read--expression-try-read bindings
* lisp/simple.el (read--expression): No longer bind read--expression-try-read here. * lisp/simple.el (read-expression-map): Bind read--expression-try-read here (bug#42893). This new specialized command was recently added in [1:4a6dd13fa4
]. It reestablishes the bindings every time `read--expression' is invoked, which is wrong because it makes it impossible for users to remove these bindings. 1:4a6dd13fa4
Change 'M-:' to not error out on incomplete expressions.
This commit is contained in:
parent
bdda935a7d
commit
8c68a15f2a
1 changed files with 2 additions and 2 deletions
|
@ -1558,6 +1558,8 @@ in *Help* buffer. See also the command `describe-char'."
|
|||
;; Might as well bind TAB to completion, since inserting a TAB char is
|
||||
;; much too rarely useful.
|
||||
(define-key m "\t" 'completion-at-point)
|
||||
(define-key m "\r" 'read--expression-try-read)
|
||||
(define-key m "\n" 'read--expression-try-read)
|
||||
(set-keymap-parent m minibuffer-local-map)
|
||||
m))
|
||||
|
||||
|
@ -1654,8 +1656,6 @@ function `read-from-minibuffer'."
|
|||
(set-syntax-table emacs-lisp-mode-syntax-table)
|
||||
(add-hook 'completion-at-point-functions
|
||||
#'elisp-completion-at-point nil t)
|
||||
(local-set-key "\r" 'read--expression-try-read)
|
||||
(local-set-key "\n" 'read--expression-try-read)
|
||||
(run-hooks 'eval-expression-minibuffer-setup-hook))
|
||||
(read-from-minibuffer prompt initial-contents
|
||||
read-expression-map t
|
||||
|
|
Loading…
Add table
Reference in a new issue