From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Cadilhac Newsgroups: gmane.emacs.help Subject: Re: use of special-event-map Date: Sat, 07 May 2005 02:42:26 +0200 Organization: LRDE Message-ID: <87k6mb6f4d.fsf@mahaena.lrde> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2132266302==" X-Trace: sea.gmane.org 1115426240 19125 80.91.229.2 (7 May 2005 00:37:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 7 May 2005 00:37:20 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 07 02:37:17 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DUDJk-0002mR-CW for geh-help-gnu-emacs@m.gmane.org; Sat, 07 May 2005 02:37:16 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DUDRY-0004v9-Lb for geh-help-gnu-emacs@m.gmane.org; Fri, 06 May 2005 20:45:20 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.multikabel.nl!news2.euro.net!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!proxad.net!infeed-1.proxad.net!news6-e.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:iuo0tXCNYBrO9Tu4va0SJf0YtQg= Original-Lines: 56 Original-NNTP-Posting-Date: 07 May 2005 02:42:16 MEST Original-NNTP-Posting-Host: 82.67.244.61 Original-X-Trace: 1115426536 news6-e.free.fr 296 82.67.244.61:36925 Original-X-Complaints-To: abuse@proxad.net Original-Xref: shelby.stanford.edu gnu.emacs.help:130736 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:26388 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:26388 --===============2132266302== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable "Drew Adams" 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 remo= ve > 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)) =2D-=20 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 | --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQBCfA71ZYNf4qobZ7kRAoe+AJwK9WY/gN2ZJWZVEhbrsVYElO3dVACg56s3 cZmR3xwmMub0DLSdCHidbbU= =V6wE -----END PGP SIGNATURE----- --=-=-=-- --===============2132266302== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs --===============2132266302==--