Commits

Anonymous committed bf940a1

(xwem-frame-config-dump): [fix] Save only
builtin frame properties, because others can reference to
unrestorable objects.

Comments (0)

Files changed (2)

+2004-05-11  Zajcev Evgeny  <zevlg@yandex.ru>
+
+	* lisp/xwem-frame.el (xwem-frame-config-dump): [fix] Save only
+	builtin frame properties, because others can reference to
+	unrestorable objects.
+
 2004-05-06  Norbert Koch  <viteno@xemacs.org>
 
 	* Makefile (VERSION): XEmacs package 1.09 released.
   :type '(restricted-sexp :match-alternatives ('nil xwem-misc-colorspec-valid-p))
   :group 'xwem-frame)
 
+(defconst xwem-frame-builtin-properties
+  '(inner-border-width otter-border-width title-height title-thickness)
+  "List of valid builtin frame properties.")
+
 (defcustom xwem-frame-defprops
   (list 'inner-border-width 0		;internal border of xwem's frame
 	'otter-border-width 0		;
   (unless file
     (setq file (concat xwem-dir "/" "xwem-configs.el")))
 
-  (let ((ccf (copy-sequence config))
-        (buf (find-file-noselect file))
-        wcf)
+  (let* ((ccf (copy-sequence config))
+         (find-file-hooks nil)          ; omit autoinsert and others
+         (buf (find-file-noselect file))
+         wcf nprops)
     (with-current-buffer buf
       (erase-buffer buf)
       (insert "(setq xwem-frame-dumped-config (list 'xwem-frame-configuration\n")
       (mapc (lambda (sfr)
               (setf (xwem-frame-saved-frame sfr) nil)
+
+              ;; Adjust properties
+              (setq nprops (xwem-frame-saved-props sfr))
+              (setf (xwem-frame-saved-props sfr) nil)
+              (mapc (lambda (prop)
+                      (plist-put (xwem-frame-saved-props sfr) prop
+                                 (plist-get nprops prop)))
+                    '(inner-border-width otter-border-width title-height title-thickness))
+
+              ;; Adjust win config
               (setq wcf (xwem-frame-saved-winconfig sfr))
               (setf (xwem-win-config-frame wcf) nil)
               (setf (xwem-win-config-current-cl wcf) nil)