all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 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

* Re: modify-frame-parameters seems to affect double-mouse binding
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2005-01-23 17:38 UTC (permalink / raw)
  Cc: emacs-devel

    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?

It doesn't fail for me in the current sources.  I see "BAR" in the
echo area even after putting in the larger font.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: modify-frame-parameters seems to affect double-mouse binding
  2005-01-23 17:38 ` Richard Stallman
@ 2005-01-23 18:43   ` Drew Adams
  0 siblings, 0 replies; 3+ messages in thread
From: Drew Adams @ 2005-01-23 18:43 UTC (permalink / raw)
  Cc: emacs-devel

    It doesn't fail for me in the current sources.  I see "BAR" in the
    echo area even after putting in the larger font.
    
OK. Thanks.

^ 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 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.