XEmacs 21.4.6 "Common Lisp".
[chise/xemacs-chise.git.1] / lisp / cus-edit.el
index 38b437f..6a654ad 100644 (file)
@@ -3391,15 +3391,19 @@ Leave point at the location of the call, or after the last expression."
        (princ "\n"))
        (princ "(custom-set-variables")
        (mapatoms (lambda (symbol)
-                 (let ((spec (car-safe (get symbol 'theme-value)))
+                 (let ((spec (car-safe (get symbol 'theme-value)))
                        (requests (get symbol 'custom-requests))
                        (now (not (or (get symbol 'standard-value)
                                      (and (not (boundp symbol))
                                           (not (eq (get symbol 'force-value)
                                                    'rogue))))))
                        (comment (get symbol 'saved-variable-comment)))
-                   (when (or (and spec (eq (car spec) 'user)
-                              (eq (second spec) 'set)) comment)
+                   (when (or (and spec
+                                  (eq (car spec) 'user)
+                                  (eq (second spec) 'set))
+                             comment
+                             ;; support non-themed vars
+                             (and (null spec) (get symbol 'saved-value)))
                      (princ "\n '(")
                      (prin1 symbol)
                      (princ " ")
@@ -3429,10 +3433,14 @@ Leave point at the location of the call, or after the last expression."
              (and (not (find-face symbol))
                   (not (eq (get symbol 'force-face) 'rogue)))))))
     (when (or (and (not (memq symbol custom-save-face-ignoring))
-              ;; Don't print default face here.
-              theme-spec
-              (eq (car theme-spec) 'user)
-              (eq (second theme-spec) 'set)) comment)
+                  ;; Don't print default face here.
+                  (or (and theme-spec
+                           (eq (car theme-spec) 'user)
+                           (eq (second theme-spec) 'set))
+                      ;; cope with non-themed faces
+                      (and (null theme-spec)
+                           (get symbol 'saved-face))))
+             comment)
       (princ "\n '(")
       (prin1 symbol)
       (princ " ")