On 3/2/2023 11:15 PM, Jim Porter wrote: > On 3/2/2023 11:00 PM, Eli Zaretskii wrote: >>> Date: Thu, 2 Mar 2023 14:15:49 -0800 >>> Cc: Eli Zaretskii , eggert@cs.ucla.edu, >>> emacs-devel@gnu.org >>> From: Jim Porter >>> >>> Would that be safe? Since 'parameters' is an argument, we don't actually >>> know how it was created or if modifying in-place would be ok. If it were >>> just a regular quoted list, using 'setf' could cause problems. >> >> If this aspect could be an issue, perhaps it is better to implement >> the change without touching 'parameters' at all?  It isn't hard, it >> just might make the change less elegant and slightly larger. > > Pushing onto the front of 'parameters' should be safe, in the sense that > after 'make-frame' returns, the caller wouldn't be able to tell that we > did anything to it. So long as the caller can't tell, I think it's ok. > > However, there might be a better way to do this anyway; I'll think it over. Ok, I think this is better. Now, instead of messing with 'parameters', when in batch mode, we just always treat the window-system as nil (i.e. create a terminal frame). I ran the server tests with this patch, and they all look good.