Commit d42cc509 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(electric-buffer-list): Handle any kind of event.

(Electric-buffer-menu-exit): Handle any key sequence.
parent 561a73d7
......@@ -63,7 +63,8 @@ Calls value of `electric-buffer-menu-mode-hook' on entry if non-nil.
(setq select
(catch 'electric-buffer-menu-select
(message "<<< Press Space to bury the buffer list >>>")
(if (= (setq unread-command-events (list (read-char))) ?\ )
(if (eq (setq unread-command-events (list (read-event)))
?\ )
(progn (setq unread-command-events nil)
(throw 'electric-buffer-menu-select nil)))
(let ((first (progn (goto-char (point-min))
......@@ -196,7 +197,7 @@ electric-buffer-menu-mode-hook if it is non-nil."
(defun Electric-buffer-menu-exit ()
(interactive)
(setq unread-command-events (list last-input-char))
(setq unread-command-events (listify-key-sequence (this-command-keys)))
;; for robustness
(condition-case ()
(throw 'electric-buffer-menu-select nil)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment