From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Third Newsgroups: gmane.emacs.devel Subject: Re: NS port cleanups Date: Sat, 23 Oct 2021 09:58:53 +0100 Message-ID: References: <87czo3bxog.fsf.ref@yahoo.com> <87czo3bxog.fsf@yahoo.com> <8735ox9wtu.fsf_-_@yahoo.com> <87mtn4edf7.fsf@yahoo.com> <8735owcmrl.fsf@yahoo.com> <87bl3jc1bz.fsf@yahoo.com> <87ee8f8c3z.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2728"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs-Devel devel To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 23 11:06:57 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1meCzQ-0000Ss-Vk for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Oct 2021 11:06:57 +0200 Original-Received: from localhost ([::1]:37012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1meCzP-0002Hd-2E for ged-emacs-devel@m.gmane-mx.org; Sat, 23 Oct 2021 05:06:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52986) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meCrm-00015H-74 for emacs-devel@gnu.org; Sat, 23 Oct 2021 04:59:02 -0400 Original-Received: from outbound.soverin.net ([116.202.126.228]:37641) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1meCrj-0005sl-Jd for emacs-devel@gnu.org; Sat, 23 Oct 2021 04:59:01 -0400 Original-Received: from smtp.soverin.net (unknown [10.10.3.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 8C2C6D1; Sat, 23 Oct 2021 08:58:54 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.142]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1634979534; bh=x6CsoL3Tgs+A18Jfe5DyqzeOlYPHe1N/s5i+o+K9qAk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZzSEz9YgmTlCSydFwtu99fUfOWXk16OmaimUW6Xw/OVgZaZRkU9mTSpXd+AMbLv4S osiz1r7cmcz7rhgxhVN5jZAUxDZD6XaSD3gVEVYP17A826tEksrQO/PvZ9tBPfW9DC sHOyEyyXnGlJ7EmwRK4Xi1Q/MUSSKtHW4GHo72a/2s0FwM3dkTRFAi2+FAyDgmnxBw bRxcxK1TyqwzwITnJWeDzXh2Xvs/IGa8OWk9JSkQVW018QXLhNb5TvBhk2M7An4NRp WMW7/cFrg8T0IrKWQjVcVNPZsHrVWoCp8CBFacmCdEel31U7LAYgSwUt3X2Rdm0hXb W7cF0oj+Yzt4Q== Original-Received: from alan by faroe.holly.idiocy.org with local (Exim 4.95-RC2) (envelope-from ) id 1meCrd-000cO4-3L; Sat, 23 Oct 2021 09:58:53 +0100 Mail-Followup-To: Alan Third , Po Lu , Emacs-Devel devel Content-Disposition: inline In-Reply-To: <87ee8f8c3z.fsf@yahoo.com> Received-SPF: pass client-ip=116.202.126.228; envelope-from=alan@idiocy.org; helo=outbound.soverin.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:277605 Archived-At: On Thu, Oct 21, 2021 at 08:17:52AM +0800, Po Lu wrote: > Alan Third writes: > > > Looks better, thanks! > > > I think I would prefer if you split this along the lines you outlined > > in the previous email. It's quite a large patch at the moment doing a > > number of apparently unrelated things. > > Will do, thanks. But it would be easier for me if you could review the > big patch first, and if it's all fine, I'll split it up. Well, I haven't gone over the changes in nsfont.m in detail because I don't really understand what any of that code does, but aside from that and the issues I've already raised I don't see anything of concern. > > Can I ask why you're saving the context every time ns_focus is called? > > It shouldn't be necessary unless we're making a change, like calling > > NSRectClip. Any deeper functions that make changes save and restore > > the context locally. > > That makes it easier to nest ns_focus. (Unless that's a bad idea, I > think it should work.) Is there any reason to nest ns_focus? There are (according to Apple) performance reasons to not save the context unless you really need to. > >> @@ -9867,7 +9873,11 @@ Convert an X font name (XLFD) to an NS font name. > >> \n\ > >> Each SYMBOL is `control', `meta', `alt', `super', `hyper' or `none'.\n\ > >> If `none', the key is ignored by Emacs and retains its standard meaning."); > >> +#ifdef NS_IMPL_GNUSTEP > >> + ns_alternate_modifier = Qalt; > >> +#else > >> ns_alternate_modifier = Qmeta; > >> +#endif > >> > >> DEFVAR_LISP ("ns-right-alternate-modifier", ns_right_alternate_modifier, > >> "This variable describes the behavior of the right alternate or option key.\n\ > >> @@ -9888,7 +9898,11 @@ Convert an X font name (XLFD) to an NS font name. > >> \n\ > >> Each SYMBOL is `control', `meta', `alt', `super', `hyper' or `none'.\n\ > >> If `none', the key is ignored by Emacs and retains its standard meaning."); > >> +#ifdef NS_IMPL_GNUSTEP > >> + ns_command_modifier = Qmeta; > >> +#else > >> ns_command_modifier = Qsuper; > >> +#endif > > > We have command bound to super so the default Openstep shortcuts work, > > like cmd-q to quit, and alt bound to meta, because that's pretty > ^^^ > > standard in Emacs. > > What do you mean by "alt" here? If it means the "alt" key on the user's > keyboard, then I think setting ns_command_modifier to meta is TRT, > because on most systems that will be the left alt key. I mean alt as defined by GNUstep in the quote I sent you in my last email. I don't think it's our job to say that GNUstep's choice of defaults is wrong and therefore do something that would be unexpected for a GNUstep user. -- Alan Third