From: Jonas Bernoulli <jonas@bernoul.li>
To: 42893@debbugs.gnu.org
Subject: bug#42893: [PATCH 1/1] Allow overriding read--expression-try-read bindings
Date: Sun, 16 Aug 2020 21:22:29 +0200 [thread overview]
Message-ID: <20200816192229.16036-1-jonas@bernoul.li> (raw)
In-Reply-To: <20200816191848.15263-1-jonas@bernoul.li>
* 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.
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: 4a6dd13fa42c87175ac72e1980f31cac56582db3
Change 'M-:' to not error out on incomplete expressions
---
lisp/simple.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/simple.el b/lisp/simple.el
index 1cb93c5722..b45fb87887 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1558,6 +1558,8 @@ read-expression-map
;; 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 @@ read--expression
(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
--
2.28.0
next prev parent reply other threads:[~2020-08-16 19:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-16 19:18 bug#42893: [PATCH 0/1] Allow overriding read--expression-try-read bindings Jonas Bernoulli
2020-08-16 19:22 ` Jonas Bernoulli [this message]
2020-08-16 20:25 ` bug#42893: [PATCH 1/1] " Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200816192229.16036-1-jonas@bernoul.li \
--to=jonas@bernoul.li \
--cc=42893@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).