From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: NS port cleanups Date: Thu, 21 Oct 2021 08:17:52 +0800 Message-ID: <87ee8f8c3z.fsf@yahoo.com> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15253"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Emacs-Devel devel To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 21 02:21:44 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 1mdLq3-0003jU-Hb for ged-emacs-devel@m.gmane-mx.org; Thu, 21 Oct 2021 02:21:43 +0200 Original-Received: from localhost ([::1]:49040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mdLpx-0006Hk-3i for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Oct 2021 20:21:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mdLmd-0004yM-3H for emacs-devel@gnu.org; Wed, 20 Oct 2021 20:18:11 -0400 Original-Received: from sonic309-22.consmr.mail.ne1.yahoo.com ([66.163.184.148]:41118) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mdLma-0001Ia-Vu for emacs-devel@gnu.org; Wed, 20 Oct 2021 20:18:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1634775484; bh=I13Dy48aBI0Hbm+Kott7WOLNsRnFOpJ+3yujTOanGpY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=ru1UDibc/kQx8LJaNTX+VDq+143005ZeUkRT9Zl25jmzaGSygriB6zEq3X7E1ep9o8+BuEynnRKtVvT78GporZmnZdSwjHGjU6c5MkSLjx5Zg3XQxLqbZIdA2U65DtbkAJqtCMYaZMs0GsatTM7PcYcgIQZfisGk5IebWBUHXZLBCKJ2SZQyVV2N0UOx2dzaH9E5B9eahTKAkO0p/xLMHc+WuXMZHpwEjREjTqNDpvjS1d1eGnFDyfXteELZ/8E972qtx+zsut7DdCkqlba4AMkVAe9G9S5dOi8wkNVzdjt9fQc3ZLrVjbebVlBE4l2TGzWT/fvZdPutcM0c9iC2hQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1634775484; bh=Ynk7TAl03FBYS7tlcP9T6qmz8i2T6JvlnuvC6R3GGqi=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=qFuvRH7Jy2bobbvq9JJP/Fh2zck04AlBRgrTFuLfmJ0mp7uaQ2201zwQKE77jUbD4hRtrl2GyrapohdO5cDtQCoJH1op2pAYdHiktl0Q3OPGUfMBs/EvRzrLHwjUIFVZh8bYXGqwDyzW9aG0LRd46iwF2rkHztqtmCbP+FdloWfe9E5ggn8+7XXs34GGrhA+UnOD2Y3uyP2M+NYRhhABeIMXREqoNPr1aJSOOEUvgOGvXgciYg8K0I9V+bM+/Ui161LmTpJSwGqSEiUa39QxDgfNG94dKAQlvhix37CkXgUKv6Pym8n9c3FM2b6vtlvzqyUzxD4aC88BLRTFwcLBYQ== X-YMail-OSG: iIaYxf4VM1kFKjiR1KFiwPrbF4vBqqzsAqi7XDNgk7tX.Ol6UoF4V1TKUosnJ0d D7KTtKCCMwvVZG0HKX4uHKpIKUF5PnTk0WifGdTTv05qY9kw3.C950tg6fiqGYfYCxYDquF3q9gb 0XCXYynVr_.QGOIyiTcg8wJq5FF.8GMKaVtOuVSbWUs8HSXzxVeUo_41TXT27JUpaBJUWpUUT22q AT_Oy9OGY1WDtWojv.1dB7XiS1._UXD3nBntGaKFEDOydnJmfBslbE9gDJgxwsdDUG3OXVOoO2Ig oX6gyVIjwL9gHrpTwBvN1mjkrkTs_mncmBfLVWbD.hI4JRXwLQYnuoAO9OzLavh0fe3j_Vr_quds OIHpIa.hrESnK_kMfLbSK.T5jhnapbj3v1vuTttwMTQxV7pv.eY.Th39MMUit9pAkajqsQ9OIDDn vYx5TBBxcTHnTk018lN2ujhh6r5_VYx2aBFC2a3t1wVwZ.gqiCSXvYHaz5D6H00Hkg6s_SbSFf6X C7c17R2NC8z15FVzLivI1o0U91xiLvsucOnFrNgaK86XXeYz0OvUhba0sIzYS5DccP_MzwQJUw3. LopJ9ZYB9.cSbQxLoLsGpe1isnxgLp7klqZIlrc4KYSyoptnJUK22QltiuagAczziGIxjz7ghB0U SdaUhbRLpjia9yzL5MP.MKWT5irclmwBtfuC68ptwpdrGSMk_nXLzQfiNSn1s_gkELOw8Rbi_2zX j7AgCJ_P0HwaOm7FguI1nWol4EYjm0qSO3UX5EBKGs410S2wd7BDoWPfS183U6Xdwcc0HrTMqcV0 Kz9FQOh_EZpnV5r5HwhL_eMlATfwNWYCM3DfjANLoF X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.ne1.yahoo.com with HTTP; Thu, 21 Oct 2021 00:18:04 +0000 Original-Received: by kubenode501.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 03f5a4576174d3b3ede83714c17f05dd; Thu, 21 Oct 2021 00:18:00 +0000 (UTC) In-Reply-To: (Alan Third's message of "Wed, 20 Oct 2021 21:12:49 +0100") X-Mailer: WebService/1.1.19198 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.184.148; envelope-from=luangruo@yahoo.com; helo=sonic309-22.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=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:277482 Archived-At: 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. > 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 this DPS clipping for font drawing? Yes, on GNUstep DPS functions don't respect clipping set through NSRectClip. > I didn't actually mean for you to get rid of the whole comment as > apart from the first sentence it refers to the action that immediately > follows. Or do you think it's redundant? I think the entire comment is not accurate anymore; the precise behaviour of redisplay seems to have changed. But I'm not sure. >> >> @@ -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. Thanks.