Subject: Re: bug#4513: NS: File menu missing

From: David Reitter <[email-masked]>
Date: Tue, 22 Sep 2009 09:46:29 -0400

On Sep 22, 2009, at 8:55 AM, Adrian Robert wrote:
> I'm confused why no one ever mentioned this before in any of the  
> 10.6 discussions.

Same here.

> Note the top-level menubar is redone in ns-win.el, though nearly  
> identically to menu-bar.el.  No reason not to comment that stuff out  
> and retry.

Ah, that got me somewhere.

This line:

(define-key global-map [menu-bar] (make-sparse-keymap "menu-bar"))

removes the top level.  Commenting it out makes the file menu appear  
again.
However, even then the application menu is empty.

There are no changes to nsterm.m where the application menu is set up.
Also note that this call:

[NSApp setAppleMenu: appMenu]

is undocumented...

> I started looking at the 64-bit stuff and wanted to use Erik's patch  
> directly but am not sure how long his copyright assignment will  
> take.  Also there are some changes in common code that I'm not 100%  
> sure about (limited experience in 64-bit ATM).  For instance, %ld in  
> printfs, at the very least I think casts of the arguments to (long)  
> will be needed to avoid problems on 32-bit systems.

Well, I wouldn't break 32 bit compilation, but otherwise, changes to  
the 64-bit build can only make things better.

Comments on the event loop crashes (attached)?

Also, I got a complaint regarding line spacing.  Indeed, Courier 11  
isn't spaced as wide as in Cocoa text views.  Will take a look at this  
again.

- D