From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Lennart Staflin Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: broken menu items Date: Fri, 12 Sep 2003 13:21:43 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <2ACF7139-0A55-11D8-8132-00039343C89C@lysator.liu.se> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v552) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1067462447 11504 80.91.224.253 (29 Oct 2003 21:20:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 29 Oct 2003 21:20:47 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Oct 29 22:20:43 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AExkB-0005vK-00 for ; Wed, 29 Oct 2003 22:20:43 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AExkB-0004Zt-01 for ; Wed, 29 Oct 2003 22:20:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AExhH-0003cz-0M for emacs-devel@quimby.gnus.org; Wed, 29 Oct 2003 16:17:43 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AExhC-0003cN-Be for emacs-devel@gnu.org; Wed, 29 Oct 2003 16:17:38 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AExgf-0003S5-RA for emacs-devel@gnu.org; Wed, 29 Oct 2003 16:17:36 -0500 Original-Received: from [62.79.79.111] (helo=smtp120.tiscali.dk) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AExgB-0003Ns-2R for emacs-devel@gnu.org; Wed, 29 Oct 2003 16:16:35 -0500 Original-Received: from lysator.liu.se (142.ppp142.rsd.worldonline.se [213.204.142.142]) by smtp120.tiscali.dk (8.12.6p3/8.12.6) with ESMTP id h9TLGUwp040721 for ; Wed, 29 Oct 2003 22:16:31 +0100 (CET) (envelope-from lenst@lysator.liu.se) Resent-Date: Wed, 29 Oct 2003 22:16:31 +0100 Resent-Message-Id: <9F0DBAC6-0A48-11D8-8F73-00039343C89C@lysator.liu.se> Resent-To: emacs-devel@gnu.org Original-To: emacs-pretest-bug@gnu.org Resent-From: Lennart Staflin X-Mailer: Apple Mail (2.552) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:17586 gmane.emacs.pretest.bugs:1508 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:17586 I sent this to emacs-pretest-bug, but got no response. In GNU Emacs 21.3.50.7 (powerpc-apple-darwin6.6) of 2003-09-11 on Saturn.local. configured using `configure '--enable-carbon-app' 'CC=cc -traditional-cpp' 'CFLAGS=-g' 'CPPFLAGS=-traditional-cpp'' Some of the entries in menu bar of the Carbon port of Emacs seems to do nothing. Like the "Edit > Select All". I had a closer look at this and it seems that it is a call to SetMenuItemRefCon in add_menu_item that is misplaced, it is called even for separators, but for these a parameter is not set but has the same value as for the preceding item (hmm. it is actually uninitialized, must be reusing the same stack position). This clobbers the preceding item. Moving the call to SetMenuItemRefCon seems to fix this. 2003-09-12 Lennart Staflin * macmenu.c (add_menu_item): Don't call SetMenuItemRefCon for separators, as the pos parameter will be incorrect. *** macmenu.c.~1.11.~ Sat Aug 30 20:18:53 2003 --- macmenu.c Thu Sep 11 21:54:46 2003 *************** *** 2281,2289 **** else SetItemMark (menu, pos, noMark); } - } ! SetMenuItemRefCon (menu, pos, (UInt32) wv->call_data); if (submenu != NULL) SetMenuItemHierarchicalID (menu, pos, submenu); --- 2281,2289 ---- else SetItemMark (menu, pos, noMark); } ! SetMenuItemRefCon (menu, pos, (UInt32) wv->call_data); ! } if (submenu != NULL) SetMenuItemHierarchicalID (menu, pos, submenu);