emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NS port cleanups


From: Alan Third
Subject: Re: NS port cleanups
Date: Sat, 23 Oct 2021 09:58:53 +0100

On Thu, Oct 21, 2021 at 08:17:52AM +0800, Po Lu wrote:
> Alan Third <alan@idiocy.org> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]