From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: modify-frame-parameters seems to affect double-mouse binding Date: Sat, 8 Jan 2005 16:31:54 -0800 Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1105231116 16039 80.91.229.6 (9 Jan 2005 00:38:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 9 Jan 2005 00:38:36 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 09 01:38:29 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CnR6D-0004rQ-00 for ; Sun, 09 Jan 2005 01:38:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CnRHd-0002ik-O7 for ged-emacs-devel@m.gmane.org; Sat, 08 Jan 2005 19:50:17 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CnRGn-0002Y0-EM for emacs-devel@gnu.org; Sat, 08 Jan 2005 19:49:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CnRGi-0002Uj-Si for emacs-devel@gnu.org; Sat, 08 Jan 2005 19:49:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CnRGi-0002TP-Os for emacs-devel@gnu.org; Sat, 08 Jan 2005 19:49:20 -0500 Original-Received: from [148.87.2.204] (helo=inet-mail4.oracle.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CnQzz-0007we-B4 for emacs-devel@gnu.org; Sat, 08 Jan 2005 19:32:03 -0500 Original-Received: from inet-mail4.oracle.com (localhost [127.0.0.1]) by inet-mail4.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id j090W1sX005434 for ; Sat, 8 Jan 2005 16:32:01 -0800 (PST) Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.191.50]) by inet-mail4.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id j090VwUN005405 for ; Sat, 8 Jan 2005 16:31:59 -0800 (PST) Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id j090VwB1024894 for ; Sat, 8 Jan 2005 17:31:58 -0700 Original-Received: from dradamslap (dhcp-amer-csvpn-gw1-141-144-65-112.vpn.oracle.com [141.144.65.112]) by rgmsgw301.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with SMTP id j090Vv25024887 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Sat, 8 Jan 2005 17:31:58 -0700 Original-To: "Emacs-Devel" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Importance: Normal X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:32058 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32058 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'