[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a little feedback on Cocoa Emacs.app
From: |
mituharu |
Subject: |
Re: a little feedback on Cocoa Emacs.app |
Date: |
Mon, 4 Aug 2008 21:42:39 +0900 (JST) |
User-agent: |
SquirrelMail/1.4.5-1_rh7x |
> I haven't yet waded through enough of the menu handling code to figure
> out if it's easy to make it dynamic and updated from lisp, but I threw
> together code to add a fixed one-element menu, not conditionalized on
> which flavor of NS support is used. It says "new frame", not "new
> window" like some other apps use, for consistency with the other Emacs
> menus and terminology. My first, very small foray into Objective C....
>
> I've attached the current patch for feedback.
> +- (void)newFrame: (id)sender
> +{
> + Feval (Fcons (intern ("make-frame"), Qnil));
> +}
> +
Strictly speaking, Feval calls inside read_socket_hook are not
allowed by design, although the Cocoa/GNUstep port is using it
extensively...
BTW, it's not difficult to add a *static* dock menu to Carbon
Emacs 22 CVS, either. For example, add
err = CreateNewMenu (MAC_MENU_END, 0, &menu);
if (err == noErr)
err = AppendMenuItemTextWithCFString (menu, CFSTR ("New Frame"),
0, kHICommandNew, NULL);
if (err == noErr)
SetApplicationDockTileMenu (menu);
at the end of the `#ifdef MAC_OSX' part of init_menu_bar in
src/mactoolbox.c, and
(put 'new 'mac-apple-event-id "new ") ; kHICommandNew
(define-key mac-apple-event-map [hi-command new] 'make-frame)
to lisp/term/mac-win.el.
YAMAMOTO Mitsuharu
address@hidden
Re: a little feedback on Cocoa Emacs.app,
mituharu <=