1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-16 10:50:49 -08:00

Remove workarounds for solved 'read-event' bug

* lisp/subr.el (read-char-choice-with-read-key):
* lisp/net/dbus.el (dbus-call-method):
Remove workarounds for the bug fixed in the previous commit
ac82baea1c41ec974ad49f2861ae6c06bda2b4ed, where 'read-event',
'read-char' and 'read-char-exclusively' could return wrongly -1.
In the case of lisp/dbus.el, this reverts commit
7177393826.
This commit is contained in:
Tim Ruffing 2023-12-27 14:32:09 +01:00 committed by Stefan Monnier
parent 6f46dd516b
commit d444390ec5
2 changed files with 1 additions and 10 deletions

View file

@ -371,11 +371,7 @@ object is returned instead of a list containing this single Lisp object.
(apply (apply
#'dbus-message-internal dbus-message-type-method-call #'dbus-message-internal dbus-message-type-method-call
bus service path interface method #'dbus-call-method-handler args)) bus service path interface method #'dbus-call-method-handler args))
(result (unless executing-kbd-macro (cons :pending nil)))) (result (cons :pending nil)))
;; While executing a keyboard macro, we run into an infinite loop,
;; receiving the event -1. So we don't try to get the result.
;; (Bug#62018)
;; Wait until `dbus-call-method-handler' has put the result into ;; Wait until `dbus-call-method-handler' has put the result into
;; `dbus-return-values-table'. If no timeout is given, use the ;; `dbus-return-values-table'. If no timeout is given, use the

View file

@ -3554,11 +3554,6 @@ causes it to evaluate `help-form' and display the result."
(help-form-show))) (help-form-show)))
((memq char chars) ((memq char chars)
(setq done t)) (setq done t))
((and executing-kbd-macro (= char -1))
;; read-event returns -1 if we are in a kbd macro and
;; there are no more events in the macro. Attempt to
;; get an event interactively.
(setq executing-kbd-macro nil))
((not inhibit-keyboard-quit) ((not inhibit-keyboard-quit)
(cond (cond
((and (null esc-flag) (eq char ?\e)) ((and (null esc-flag) (eq char ?\e))