From: Michael Cadilhac <Michael.Cadilhac-@t-lrde.epita.fr>
Subject: Re: use of special-event-map
Date: Sat, 07 May 2005 02:42:26 +0200 [thread overview]
Message-ID: <87k6mb6f4d.fsf@mahaena.lrde> (raw)
In-Reply-To: mailman.3810.1115425040.2819.help-gnu-emacs@gnu.org
[-- Attachment #1.1: Type: text/plain, Size: 1321 bytes --]
"Drew Adams" <drew.adams@oracle.com> writes:
> Another question about use of `special-event-map' - consider this code:
>
> (define-key special-event-map [iconify-frame] 'toto)
>
> (defun foo ()
> (interactive)
> (let ((binding (lookup-key special-event-map [iconify-frame])))
> (define-key special-event-map [iconify-frame] 'ignore-event)
> (iconify-frame)
> (define-key special-event-map [iconify-frame] binding)))
>
> (defun toto (event)
> (interactive "e")
> (message "TOTO"))
>
> When I try M-x foo, `toto' gets executed, even though `foo' tries to remove
> its binding. Same thing happens if I use `nil' instead of `ignore-event'.
>
> Explanation? Any way around this? That is, is there some way I can inhibit
> the binding of [iconify-frame] for the duration of command foo?
Hi !
Mhhh, don't know if it works in any case (using Ion, iconify doesn't
make much sense), but, well... Try this:
(defun foo ()
(interactive)
(iconify-frame)
(while (not (input-pending-p))
(sit-for 1))
(discard-input))
--
Michael Cadilhac, a.k.a. Micha [mika] |
Epita/LRDE promo 2007 | Please note that you should
2 rue de la Convention | 01.46.70.90.75 | s/-@t-/@/ my mail address.
94270 Le Kremlin Bicetre | 06.23.20.31.30 |
[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]
[-- Attachment #2: Type: text/plain, Size: 152 bytes --]
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
next parent reply other threads:[~2005-05-07 0:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.3810.1115425040.2819.help-gnu-emacs@gnu.org>
2005-05-07 0:42 ` Michael Cadilhac [this message]
2005-05-07 1:00 ` use of special-event-map Drew Adams
[not found] <mailman.4149.1115600512.2819.help-gnu-emacs@gnu.org>
2005-05-09 2:12 ` Stefan Monnier
2005-05-09 12:33 ` Thien-Thi Nguyen
[not found] <mailman.4143.1115595521.2819.help-gnu-emacs@gnu.org>
2005-05-08 23:58 ` Stefan Monnier
2005-05-09 0:50 ` Drew Adams
2005-05-09 18:12 ` Kevin Rodgers
[not found] <mailman.4129.1115586334.2819.help-gnu-emacs@gnu.org>
2005-05-08 22:40 ` Stefan Monnier
2005-05-08 23:35 ` Drew Adams
2005-05-06 18:32 Drew Adams
2005-05-06 23:56 ` Drew Adams
2005-05-08 20:53 ` Drew Adams
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=87k6mb6f4d.fsf@mahaena.lrde \
--to=michael.cadilhac-@t-lrde.epita.fr \
/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.
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).