From: Noam Postavsky <npostavs@users.sourceforge.net>
To: Drew Adams <drew.adams@oracle.com>
Cc: 5923@debbugs.gnu.org
Subject: bug#5923: 23.1.95; minibuffer-message discards input events
Date: Wed, 6 Jul 2016 10:55:38 -0400 [thread overview]
Message-ID: <CAM-tV-_5NrHh1s5LPScTwCNKLdc7Cku7qh-HyF3oKWA8EY5nkw@mail.gmail.com> (raw)
In-Reply-To: <01658348-eada-4c40-974b-362da4a71a34@default>
[-- Attachment #1: Type: text/plain, Size: 503 bytes --]
tag 5923 + confirmed
found 5923 25.0.95
quit
On Wed, Jul 6, 2016 at 9:59 AM, Drew Adams <drew.adams@oracle.com> wrote:
>
> The repro example I gave was self-contained. It had nothing to
> do with Icicles, in spite of some of the function names.
Ok, had another look, it's actually not so hard to update it for newer
Emacs. Seems the bug is still existing.
emacs -Q -l bug-5923-emacs-25.el
M-x C-u C-f
See that "prefix (4)" is displayed for 2 seconds until
`describe-function' finally gets executed.
[-- Attachment #2: bug-5923-emacs-25.el --]
[-- Type: text/x-emacs-lisp, Size: 4089 bytes --]
(defvar icicle-universal-argument-map
(let ((map (make-sparse-keymap)))
(when (fboundp 'universal-argument-other-key) ; up to 24.3
(define-key map [t] 'icicle-universal-argument-other-key)
(define-key map (vector meta-prefix-char t) 'icicle-universal-argument-other-key))
(define-key map [switch-frame] nil)
(define-key map [?\C-u] 'icicle-universal-argument-more)
(define-key map [?-] 'icicle-universal-argument-minus)
(define-key map [?0] 'icicle-digit-argument)
(define-key map [?1] 'icicle-digit-argument)
(define-key map [?2] 'icicle-digit-argument)
(define-key map [?3] 'icicle-digit-argument)
(define-key map [?4] 'icicle-digit-argument)
(define-key map [?5] 'icicle-digit-argument)
(define-key map [?6] 'icicle-digit-argument)
(define-key map [?7] 'icicle-digit-argument)
(define-key map [?8] 'icicle-digit-argument)
(define-key map [?9] 'icicle-digit-argument)
(define-key map [kp-0] 'icicle-digit-argument)
(define-key map [kp-1] 'icicle-digit-argument)
(define-key map [kp-2] 'icicle-digit-argument)
(define-key map [kp-3] 'icicle-digit-argument)
(define-key map [kp-4] 'icicle-digit-argument)
(define-key map [kp-5] 'icicle-digit-argument)
(define-key map [kp-6] 'icicle-digit-argument)
(define-key map [kp-7] 'icicle-digit-argument)
(define-key map [kp-8] 'icicle-digit-argument)
(define-key map [kp-9] 'icicle-digit-argument)
(define-key map [kp-subtract] 'icicle-universal-argument-minus)
map)
"...")
(defun icicle-universal-argument ()
(interactive)
(setq prefix-arg (list 4)
universal-argument-num-events (length (this-command-keys)))
(icicle-ensure-overriding-map-is-bound)
(icicle-msg-maybe-in-minibuffer "prefix %S" prefix-arg))
(defun icicle-digit-argument (arg)
(interactive "P")
(digit-argument)
(icicle-msg-maybe-in-minibuffer "prefix %S" prefix-arg))
(defun icicle-negative-argument (arg)
(interactive "P")
(negative-argument arg)
(icicle-msg-maybe-in-minibuffer "prefix %S" prefix-arg))
(defun icicle-universal-argument-more (arg)
(interactive "P")
(universal-argument-more arg)
(icicle-msg-maybe-in-minibuffer "prefix %S" prefix-arg))
(defun icicle-universal-argument-other-key (arg)
(interactive "P")
(universal-argument-other-key arg)
(icicle-msg-maybe-in-minibuffer "prefix %S" prefix-arg))
(defun icicle-universal-argument-minus (arg)
(interactive "P")
(universal-argument-minus arg)
(icicle-msg-maybe-in-minibuffer "prefix %S" prefix-arg))
;; (defun icicle-ensure-overriding-map-is-bound ()
;; (unless overriding-map-is-bound
;; (setq saved-overriding-map overriding-terminal-local-map
;; overriding-terminal-local-map icicle-universal-argument-map
;; overriding-map-is-bound t)))
(defun icicle-ensure-overriding-map-is-bound ()
"Set `overriding-terminal-local-map' to `icicle-universal-argument-map'."
(cond
((boundp 'universal-argument-map) ; Emacs 24+
(set-transient-map icicle-universal-argument-map nil
(lambda () (icicle-msg-maybe-in-minibuffer "prefix %S" prefix-arg))))
((not (boundp 'overriding-map-is-bound)) ; Emacs 20, 21.
(setq overriding-terminal-local-map icicle-universal-argument-map))
((not overriding-terminal-local-map) ; Emacs 22+.
(setq saved-overriding-map overriding-terminal-local-map
overriding-terminal-local-map icicle-universal-argument-map
overriding-map-is-bound t))))
(defun icicle-msg-maybe-in-minibuffer (format-string &rest args)
(apply #'message format-string args)
(sit-for 1))
(define-key minibuffer-local-completion-map [remap universal-argument]
'icicle-universal-argument)
(define-key minibuffer-local-completion-map [remap negative-argument]
'icicle-negative-argument)
(define-key minibuffer-local-completion-map [remap digit-argument]
'icicle-digit-argument)
(defun test2 () (interactive) (describe-function '+))
(define-key minibuffer-local-completion-map "\C-f" 'test2)
next prev parent reply other threads:[~2016-07-06 14:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-10 16:52 bug#5923: 23.1.95; minibuffer-message discards input events Drew Adams
2010-04-10 19:15 ` Stefan Monnier
2010-04-10 19:59 ` Drew Adams
2010-04-14 2:19 ` Stefan Monnier
2010-04-14 5:06 ` Drew Adams
2010-04-19 5:38 ` Drew Adams
2010-04-19 6:09 ` Drew Adams
2010-04-20 16:18 ` Drew Adams
2010-04-20 23:45 ` Drew Adams
2010-04-21 0:05 ` Drew Adams
2010-07-23 22:26 ` Stefan Monnier
2010-07-28 15:24 ` Drew Adams
2016-07-05 4:06 ` npostavs
2016-07-05 14:19 ` Drew Adams
2016-07-06 13:11 ` Noam Postavsky
2016-07-06 13:59 ` Drew Adams
2016-07-06 14:55 ` Noam Postavsky [this message]
2016-07-06 15:05 ` Eli Zaretskii
2016-07-06 15:30 ` Noam Postavsky
2016-07-06 15:38 ` Eli Zaretskii
2016-07-06 14:25 ` bug#3938: " Eli Zaretskii
2016-07-06 15:10 ` bug#5923: " Drew Adams
2016-07-06 15:32 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAM-tV-_5NrHh1s5LPScTwCNKLdc7Cku7qh-HyF3oKWA8EY5nkw@mail.gmail.com \
--to=npostavs@users.sourceforge.net \
--cc=5923@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.