[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6881: 23.2; bookmark-bmenu-search makes menu disappear
From: |
Thierry Volpiatto |
Subject: |
bug#6881: 23.2; bookmark-bmenu-search makes menu disappear |
Date: |
Thu, 19 Aug 2010 11:22:08 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Leo <sdl.web@gmail.com> writes:
> This is a bug in read-key.
read-key should not echo the command in minibuffer.
> It appears using read-char solve this problem and the key echoing one.
Note that if read-char is used in `bookmark-read-search-input'
`inhibit-quit' need to be set to t, as read-char is not aware of C-g
like read-key.
It is safe to use inhibit-quit in bookmark-read-search-input, i use it
without problems since months in bookmark-extensions.el (with
read-char).
An alternative to read-char is to use most of the time read-char and
when read-char fail use read-event instead:
(defun ioccur-read-char-or-event (prompt)
"Replace `read-key' when not available using PROMPT."
(if (fboundp 'read-key)
(read-key prompt)
-> (let* ((chr (condition-case nil (read-char prompt) (error nil)))
-> (evt (unless chr (read-event prompt))))
-> (or chr evt))))
--
Thierry Volpiatto
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997