emacs-devel
[Top][All Lists]
Advanced

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

Re: Help using the right hook for loading theme on emacs daemon GUI


From: Eli Zaretskii
Subject: Re: Help using the right hook for loading theme on emacs daemon GUI
Date: Fri, 25 Jan 2019 09:20:23 +0200

> Date: Fri, 25 Jan 2019 14:42:53 +1300
> From: Phil Sainty <address@hidden>
> Cc: address@hidden, address@hidden
> 
> I forgot to add -- the point I originally thought this docstring needed
> to make was that FRAME will not be selected when the hook runs, and it 
> is
> up to the function to select it if required.

Well, since FRAME is being passed as an argument to the hook, it
should be quite clear the frame is not selected, otherwise it would
make no sense to pass that argument, right?  But I see no harm in
saying that explicitly.

> I'd be inclined to have the docstring suggest that the following be used
> in that scenario:
> 
> (with-selected-frame FRAME
>    ...)

I wouldn't make this so explicit.  Selecting a frame affects Emacs in
significant ways, and the hook might not need that at all.  I think
saying that the frame is not selected should be enough; any Lisp
programmer can then decide for themselves whether they really need to
select the frame for whatever they need to do in the hook.



reply via email to

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