emacs-devel
[Top][All Lists]
Advanced

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

Re: "Attempt to modify read-only object" error with set-frame-configurat


From: martin rudalics
Subject: Re: "Attempt to modify read-only object" error with set-frame-configuration
Date: Wed, 26 Dec 2007 09:49:25 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

>   1. w32-win.el has a literal cons-cell in the following function:
>
>     (defun x-handle-iconic (switch)
>       "Make \"-iconic\" SWITCH apply only to the initial frame."
>       (push '(visibility . icon) initial-frame-alist))
>
>      Note that x-win.el also has an equivalent one.
>
>   2. On the multi-tty merge, term/*-win.elc files are changed to be
>      preloaded.  As a result, the above cons cell is allocated in the
>      pure storage on Emacs 23.
>
>   3. The X11 version of Fx_create_frame creates a copy of frame
>      parameters,
>
>       3030 DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
>        :
>       3057   parms = Fcopy_alist (parms);
>
>      but the W32 port doesn't do so.
>
> You don't see the problem on Emacs 22 or on X11 because of 2 or 3
> above, respectively.
>
> As for 3 above, the Carbon port of Emacs 22 creates a copy of frame
> parameters just as in X11.  But it seems to be changed not to do so on
> the multi-tty merge for some reason I'm not sure.

Confirmed :-)

The simple patch I attached handles all problems I encountered in this
context, including the pure storage problems and that of multiple
occurrences of fringes I mentioned earlier.
*** w32fns.c.~1.307.~   Wed Nov 14 18:33:36 2007
--- w32fns.c    Wed Dec 26 09:35:06 2007
***************
*** 4165,4170 ****
--- 4165,4172 ----
  
    check_w32 ();
  
+   parameters = Fcopy_alist (parameters);
+ 
    /* Use this general default value to start with
       until we know if this frame has a specified name.  */
    Vx_resource_name = Vinvocation_name;

reply via email to

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