emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

broken menu items


From: Lennart Staflin
Subject: broken menu items
Date: Fri, 12 Sep 2003 13:21:43 +0200

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  <address@hidden>

        * 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);







reply via email to

[Prev in Thread] Current Thread [Next in Thread]