* modify-frame-parameters seems to affect double-mouse binding
@ 2005-01-09 0:31 Drew Adams
2005-01-23 17:38 ` Richard Stallman
0 siblings, 1 reply; 3+ messages in thread
From: Drew Adams @ 2005-01-09 0:31 UTC (permalink / raw)
I'd really like to understand what's happening here, and know if this
is a bug or not. If not, what can I do to work around this behavior?
1. Open a new frame.
2. In the code below, change the font string to be the default font
for the frame you opened - that is,
(assq 'font (frame-parameters (selected-frame))).
3. Shift double-click in the new frame. This echoes first FOO, then
BAR, as you would expect. Since the new font given with
modify-frame-parameters is the same as the current font, there is
in fact no change in the frame font size.
4. Now, change the font size in foo's font string to a slightly
different size (e.g. change it from 14 to 18), so that the font
will actually be changed by modify-frame-parameters in foo.
5. Shift double-click in the same frame. This now echoes FOO
twice. Command bar is never executed.
I get the same behavior in Emacs 20 and Emacs 21.3.50 (from July).
Why is bar never executed? What can I do differently so that bar will
be executed on the second click?
(defun foo ()
(interactive)
(message "FOO")(sit-for 1)
(modify-frame-parameters
(selected-frame)
(list (cons 'font "-*-Lucida
Console-normal-r-*-*-14-*-96-96-c-*-iso8859-1"))))
(defun bar () (interactive) (message "BAR")(sit-for 1))
(define-key global-map [S-mouse-1] 'foo)
(define-key global-map [S-double-mouse-1] 'bar)
(define-key global-map [S-down-mouse-1] nil)
(define-key global-map [S-double-down-mouse-1] nil)
In GNU Emacs 21.3.50.1 (i386-mingw-nt5.1.2600)
of 2004-07-26 on BERATUNG4
configured using `configure --with-gcc
(3.3) --cflags -I../../jpeg-6b-1/include -I../../libpng-1.2.4-1/include -I..
/../tiff-3.5.7/include -I../../xpm-nox-4.2.0/include -I../../zlib-1.1.4-1/in
clude'
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-01-23 18:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-09 0:31 modify-frame-parameters seems to affect double-mouse binding Drew Adams
2005-01-23 17:38 ` Richard Stallman
2005-01-23 18:43 ` Drew Adams
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).