[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug, probably related to Custom Themes.
From: |
Luc Teirlinck |
Subject: |
Re: Bug, probably related to Custom Themes. |
Date: |
Thu, 22 Dec 2005 18:20:59 -0600 (CST) |
Richard Stallman wrote:
I agree.
In what way does the current behavior differ from that?
I have the impression the the current code usually restores the theme
value and sometimes the no-theme default. I believe that it tries to
always restore the no-theme default (which it should not), but that,
because of severe bugs, it seldom succeeds. It is impossible to know
for sure what the code is actually _trying_ to do, however. It appears
to be very buggy.
The patch below will assure that the theme value is consistently
restored. I can install if desired.
===File ~/cus-edit-diff=====================================
*** cus-edit.el 19 Dec 2005 16:46:48 -0600 1.250
--- cus-edit.el 22 Dec 2005 13:35:11 -0600
***************
*** 4031,4040 ****
"Save all customized variables in `custom-file'."
(save-excursion
(custom-save-delete 'custom-load-themes)
- (custom-save-delete 'custom-reset-variables)
(custom-save-delete 'custom-set-variables)
(custom-save-loaded-themes)
- (custom-save-resets 'theme-value 'custom-reset-variables nil)
(let ((standard-output (current-buffer))
(saved-list (make-list 1 0))
sort-fold-case)
--- 4031,4038 ----
***************
*** 4095,4103 ****
(defun custom-save-faces ()
"Save all customized faces in `custom-file'."
(save-excursion
- (custom-save-delete 'custom-reset-faces)
(custom-save-delete 'custom-set-faces)
- (custom-save-resets 'theme-face 'custom-reset-faces '(default))
(let ((standard-output (current-buffer))
(saved-list (make-list 1 0))
sort-fold-case)
--- 4093,4099 ----
***************
*** 4149,4180 ****
(unless (looking-at "\n")
(princ "\n")))))
! (defun custom-save-resets (property setter special)
! (let (started-writing ignored-special)
! ;; (custom-save-delete setter) Done by caller
! (let ((standard-output (current-buffer))
! (mapper `(lambda (object)
! (let ((spec (car-safe (get object (quote ,property)))))
! (when (and (not (memq object ignored-special))
! (eq (nth 0 spec) 'user)
! (eq (nth 1 spec) 'reset))
! ;; Do not write reset statements unless necessary.
! (unless started-writing
! (setq started-writing t)
! (unless (bolp)
! (princ "\n"))
! (princ "(")
! (princ (quote ,setter))
! (princ "\n '(")
! (prin1 object)
! (princ " ")
! (prin1 (nth 3 spec))
! (princ ")")))))))
! (mapc mapper special)
! (setq ignored-special special)
! (mapatoms mapper)
! (when started-writing
! (princ ")\n")))))
(defun custom-save-loaded-themes ()
(let ((themes (reverse (get 'user 'theme-loads-themes)))
--- 4145,4176 ----
(unless (looking-at "\n")
(princ "\n")))))
! ;; (defun custom-save-resets (property setter special)
! ;; (let (started-writing ignored-special)
! ;; ;; (custom-save-delete setter) Done by caller
! ;; (let ((standard-output (current-buffer))
! ;; (mapper `(lambda (object)
! ;; (let ((spec (car-safe (get object (quote ,property)))))
! ;; (when (and (not (memq object ignored-special))
! ;; (eq (nth 0 spec) 'user)
! ;; (eq (nth 1 spec) 'reset))
! ;; ;; Do not write reset statements unless necessary.
! ;; (unless started-writing
! ;; (setq started-writing t)
! ;; (unless (bolp)
! ;; (princ "\n"))
! ;; (princ "(")
! ;; (princ (quote ,setter))
! ;; (princ "\n '(")
! ;; (prin1 object)
! ;; (princ " ")
! ;; (prin1 (nth 3 spec))
! ;; (princ ")")))))))
! ;; (mapc mapper special)
! ;; (setq ignored-special special)
! ;; (mapatoms mapper)
! ;; (when started-writing
! ;; (princ ")\n")))))
(defun custom-save-loaded-themes ()
(let ((themes (reverse (get 'user 'theme-loads-themes)))
============================================================
- Bug, probably related to Custom Themes., Luc Teirlinck, 2005/12/20
- Re: Bug, probably related to Custom Themes., Chong Yidong, 2005/12/21
- Re: Bug, probably related to Custom Themes., Luc Teirlinck, 2005/12/21
- Re: Bug, probably related to Custom Themes., Chong Yidong, 2005/12/21
- Re: Bug, probably related to Custom Themes., Luc Teirlinck, 2005/12/21
- Re: Bug, probably related to Custom Themes., Richard M. Stallman, 2005/12/22
- Re: Bug, probably related to Custom Themes.,
Luc Teirlinck <=
- Re: Bug, probably related to Custom Themes., Luc Teirlinck, 2005/12/22
- Re: Bug, probably related to Custom Themes., Luc Teirlinck, 2005/12/22
- Re: Bug, probably related to Custom Themes., Richard M. Stallman, 2005/12/23
- Re: Bug, probably related to Custom Themes., Luc Teirlinck, 2005/12/23
- Re: Bug, probably related to Custom Themes., Chong Yidong, 2005/12/23
- Re: Bug, probably related to Custom Themes., Luc Teirlinck, 2005/12/23
- Re: Bug, probably related to Custom Themes., Luc Teirlinck, 2005/12/23
- Re: Bug, probably related to Custom Themes., Chong Yidong, 2005/12/23
- Re: Bug, probably related to Custom Themes., Luc Teirlinck, 2005/12/23
- Re: Bug, probably related to Custom Themes., Luc Teirlinck, 2005/12/23