Anonymous avatar 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.

lisp/xwem-frame.el

   :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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.