From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: mituharu@math.s.chiba-u.ac.jp Newsgroups: gmane.emacs.devel Subject: Re: a little feedback on Cocoa Emacs.app Date: Mon, 4 Aug 2008 21:42:39 +0900 (JST) Message-ID: <50642.203.180.89.51.1217853759.squirrel@weber.math.s.chiba-u.ac.jp> References: <4358E889-E5D2-4E68-83D3-E6AB9C03F7B5@gnu.org><508B5967-EAA1-4DEA-8533-19E4C0CD4ECF@gnu.org> <9F4D1718-BBB2-489C-8124-35189C98775E@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-2022-jp Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1217859922 16015 80.91.229.12 (4 Aug 2008 14:25:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Aug 2008 14:25:22 +0000 (UTC) Cc: Adrian Robert , emacs-devel@gnu.org To: "Ken Raeburn" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 04 16:26:12 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KQ10i-00061j-Nm for ged-emacs-devel@m.gmane.org; Mon, 04 Aug 2008 16:26:08 +0200 Original-Received: from localhost ([127.0.0.1]:43114 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQ0zn-00040E-LS for ged-emacs-devel@m.gmane.org; Mon, 04 Aug 2008 10:25:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQ0yw-0003Km-Du for emacs-devel@gnu.org; Mon, 04 Aug 2008 10:24:18 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQ0yv-0003IB-0r for emacs-devel@gnu.org; Mon, 04 Aug 2008 10:24:17 -0400 Original-Received: from [199.232.76.173] (port=40432 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQ0yu-0003Hh-Me for emacs-devel@gnu.org; Mon, 04 Aug 2008 10:24:16 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:40474) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KQ0yn-0005mf-C0; Mon, 04 Aug 2008 10:24:09 -0400 Original-Received: from ntp.math.s.chiba-u.ac.jp ([133.82.132.2] helo=mathmail.math.s.chiba-u.ac.jp) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KPzQ5-0004on-Rx; Mon, 04 Aug 2008 08:44:14 -0400 Original-Received: from weber.math.s.chiba-u.ac.jp (weber.math.s.chiba-u.ac.jp [133.82.132.4]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 052132C46; Mon, 4 Aug 2008 21:42:39 +0900 (JST) Original-Received: from 203.180.89.51 (SquirrelMail authenticated user mituharu) by weber.math.s.chiba-u.ac.jp with HTTP; Mon, 4 Aug 2008 21:42:39 +0900 (JST) In-Reply-To: <9F4D1718-BBB2-489C-8124-35189C98775E@gnu.org> User-Agent: SquirrelMail/1.4.5-1_rh7x X-Priority: 3 (Normal) Importance: Normal X-detected-kernel: by mx20.gnu.org: NetBSD 3.0 (DF) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) 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: news.gmane.org gmane.emacs.devel:102037 Archived-At: > 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 =3D CreateNewMenu (MAC_MENU_END, 0, &menu); if (err =3D=3D noErr) err =3D AppendMenuItemTextWithCFString (menu, CFSTR ("New Frame"), 0, kHICommandNew, NULL); if (err =3D=3D 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 mituharu@math.s.chiba-u.ac.jp