Subject: Re: bug#65719: [PATCH] Pass restart argument to 'kill-emacs-query-functions'

From: [email-masked]
Date: Tue, 07 Jan 2025 15:54:42 +0000

> It's a strange (and maybe even dangerous) distinction.

I'm afraid I don't see this, could you elaborate?

> But in any case, I think a cleaner solution would be to bind a
> variable inside restart-emacs, and then your hook could examine it.
> Alternatively, ...
> 
>> > In any case, the prefix argument is available via current-prefix-arg.
>> 
>> Yes you're right, I realised after I sent it....
> 
> ...you could invoke restart-emacs with a prefix argument, and examine
> that in your kill-emacs-query-functions hook.  AFAICT, this should
> work without any changes.

I'm afraid I also don't follow here, how is that cleaner than 
introducing
a specific hook? Rather than needing to specifically modify a function
to work with the prefix argument, you can just add it to the hook.