aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorChong Yidong2005-12-24 06:45:16 +0000
committerChong Yidong2005-12-24 06:45:16 +0000
commit25c6d44741ed7de842aa8e6e444d5029a7a7df07 (patch)
treeeecea56e2f69de548ca11a190052f3fe72e912ab /lisp
parent9ff7a71aae8348973188d131c2166ceb94eb008c (diff)
downloademacs-25c6d44741ed7de842aa8e6e444d5029a7a7df07.tar.gz
emacs-25c6d44741ed7de842aa8e6e444d5029a7a7df07.zip
* cus-edit.el (custom-variable-set, custom-variable-set)
(custom-variable-reset-saved, custom-variable-reset-backup) (custom-face-set, custom-face-reset-saved): Update `user' theme. (custom-variable-save): Fix typos. (custom-variable-state-set, custom-face-state-set): Check theme-value. (custom-variable-reset-standard, custom-face-reset-standard): Perform custom theme recalc unconditionally.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/cus-edit.el39
2 files changed, 28 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7c5b5fd96c1..7bb666024c4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -9,10 +9,14 @@
9 (custom-themed): New face. 9 (custom-themed): New face.
10 (custom-magic-alist): New value, THEMED, for theme settings. 10 (custom-magic-alist): New value, THEMED, for theme settings.
11 (custom-variable-state-set, custom-face-state-set): Check 11 (custom-variable-state-set, custom-face-state-set): Check
12 theme-value. 12 theme-value instead of saved-value.
13 (custom-variable-reset-standard, custom-face-reset-standard): 13 (custom-variable-reset-standard, custom-face-reset-standard):
14 Remove theme setting entirely. Recalculate new values. 14 Remove theme setting entirely. Recalculate new values.
15 15 (custom-variable-set, custom-variable-set)
16 (custom-variable-reset-saved, custom-variable-reset-backup)
17 (custom-face-set, custom-face-reset-saved): Update `user' theme.
18 (custom-variable-save): Fix typos.
19
162005-12-23 Juri Linkov <juri@jurta.org> 202005-12-23 Juri Linkov <juri@jurta.org>
17 21
18 * emacs-lisp/edebug.el (edebug-all-defs, edebug-all-forms): 22 * emacs-lisp/edebug.el (edebug-all-defs, edebug-all-forms):
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
index 27be2a84980..8034d23a5e0 100644
--- a/lisp/cus-edit.el
+++ b/lisp/cus-edit.el
@@ -2545,12 +2545,15 @@ Otherwise, look up symbol in `custom-guess-type-alist'."
2545 (error nil)) 2545 (error nil))
2546 'set 2546 'set
2547 'changed)) 2547 'changed))
2548 ((progn (setq tmp (get symbol 'saved-value)) 2548 ((progn (setq tmp (get symbol 'theme-value))
2549 (setq temp (get symbol 'saved-variable-comment)) 2549 (setq temp (get symbol 'saved-variable-comment))
2550 (or tmp temp)) 2550 (or tmp temp))
2551 (if (condition-case nil 2551 (if (condition-case nil
2552 (and (equal value (eval (car tmp))) 2552 (and (equal comment temp)
2553 (equal comment temp)) 2553 (equal value
2554 (eval (car
2555 (custom-theme-value
2556 (caar tmp) tmp)))))
2554 (error nil)) 2557 (error nil))
2555 (cond 2558 (cond
2556 ((eq 'user (caar (get symbol 'theme-value))) 2559 ((eq 'user (caar (get symbol 'theme-value)))
@@ -2666,6 +2669,8 @@ Optional EVENT is the location for the menu."
2666 ;; Make the comment invisible by hand if it's empty 2669 ;; Make the comment invisible by hand if it's empty
2667 (custom-comment-hide comment-widget)) 2670 (custom-comment-hide comment-widget))
2668 (custom-variable-backup-value widget) 2671 (custom-variable-backup-value widget)
2672 (custom-push-theme 'theme-value symbol 'user
2673 'set (widget-value child))
2669 (funcall set symbol (eval (setq val (widget-value child)))) 2674 (funcall set symbol (eval (setq val (widget-value child))))
2670 (put symbol 'customized-value (list val)) 2675 (put symbol 'customized-value (list val))
2671 (put symbol 'variable-comment comment) 2676 (put symbol 'variable-comment comment)
@@ -2676,6 +2681,8 @@ Optional EVENT is the location for the menu."
2676 ;; Make the comment invisible by hand if it's empty 2681 ;; Make the comment invisible by hand if it's empty
2677 (custom-comment-hide comment-widget)) 2682 (custom-comment-hide comment-widget))
2678 (custom-variable-backup-value widget) 2683 (custom-variable-backup-value widget)
2684 (custom-push-theme 'theme-value symbol 'user
2685 'set (widget-value child))
2679 (funcall set symbol (setq val (widget-value child))) 2686 (funcall set symbol (setq val (widget-value child)))
2680 (put symbol 'customized-value (list (custom-quote val))) 2687 (put symbol 'customized-value (list (custom-quote val)))
2681 (put symbol 'variable-comment comment) 2688 (put symbol 'variable-comment comment)
@@ -2705,7 +2712,7 @@ Optional EVENT is the location for the menu."
2705 (custom-comment-hide comment-widget)) 2712 (custom-comment-hide comment-widget))
2706 (put symbol 'saved-value (list (widget-value child))) 2713 (put symbol 'saved-value (list (widget-value child)))
2707 (custom-push-theme 'theme-value symbol 'user 2714 (custom-push-theme 'theme-value symbol 'user
2708 'set (list (widget-value child))) 2715 'set (widget-value child))
2709 (funcall set symbol (eval (widget-value child))) 2716 (funcall set symbol (eval (widget-value child)))
2710 (put symbol 'variable-comment comment) 2717 (put symbol 'variable-comment comment)
2711 (put symbol 'saved-variable-comment comment)) 2718 (put symbol 'saved-variable-comment comment))
@@ -2717,8 +2724,8 @@ Optional EVENT is the location for the menu."
2717 (put symbol 'saved-value 2724 (put symbol 'saved-value
2718 (list (custom-quote (widget-value child)))) 2725 (list (custom-quote (widget-value child))))
2719 (custom-push-theme 'theme-value symbol 'user 2726 (custom-push-theme 'theme-value symbol 'user
2720 'set (list (custom-quote (widget-value 2727 'set (custom-quote (widget-value
2721 child)))) 2728 child)))
2722 (funcall set symbol (widget-value child)) 2729 (funcall set symbol (widget-value child))
2723 (put symbol 'variable-comment comment) 2730 (put symbol 'variable-comment comment)
2724 (put symbol 'saved-variable-comment comment))) 2731 (put symbol 'saved-variable-comment comment)))
@@ -2739,6 +2746,7 @@ becomes the backup value, so you can get it again."
2739 (cond ((or value comment) 2746 (cond ((or value comment)
2740 (put symbol 'variable-comment comment) 2747 (put symbol 'variable-comment comment)
2741 (custom-variable-backup-value widget) 2748 (custom-variable-backup-value widget)
2749 (custom-push-theme 'theme-value symbol 'user 'set value)
2742 (condition-case nil 2750 (condition-case nil
2743 (funcall set symbol (eval (car value))) 2751 (funcall set symbol (eval (car value)))
2744 (error nil))) 2752 (error nil)))
@@ -2759,17 +2767,15 @@ becomes the backup value, so you can get it again."
2759 (let* ((symbol (widget-value widget)) 2767 (let* ((symbol (widget-value widget))
2760 (set (or (get symbol 'custom-set) 'set-default))) 2768 (set (or (get symbol 'custom-set) 'set-default)))
2761 (if (get symbol 'standard-value) 2769 (if (get symbol 'standard-value)
2762 (progn 2770 (custom-variable-backup-value widget)
2763 (custom-variable-backup-value widget)
2764 (funcall set symbol (eval (car (get symbol 'standard-value)))))
2765 (error "No standard setting known for %S" symbol)) 2771 (error "No standard setting known for %S" symbol))
2766 (put symbol 'variable-comment nil) 2772 (put symbol 'variable-comment nil)
2767 (put symbol 'customized-value nil) 2773 (put symbol 'customized-value nil)
2768 (put symbol 'customized-variable-comment nil) 2774 (put symbol 'customized-variable-comment nil)
2775 (custom-push-theme 'theme-value symbol 'user 'reset nil)
2776 (custom-theme-recalc-variable symbol)
2769 (when (or (get symbol 'saved-value) (get symbol 'saved-variable-comment)) 2777 (when (or (get symbol 'saved-value) (get symbol 'saved-variable-comment))
2770 (put symbol 'saved-value nil) 2778 (put symbol 'saved-value nil)
2771 (custom-push-theme 'theme-value symbol 'user 'reset nil)
2772 (custom-theme-recalc-variable symbol)
2773 (put symbol 'saved-variable-comment nil) 2779 (put symbol 'saved-variable-comment nil)
2774 (custom-save-all)) 2780 (custom-save-all))
2775 (widget-put widget :custom-state 'unknown) 2781 (widget-put widget :custom-state 'unknown)
@@ -2801,6 +2807,7 @@ to switch between two values."
2801 (if value 2807 (if value
2802 (progn 2808 (progn
2803 (custom-variable-backup-value widget) 2809 (custom-variable-backup-value widget)
2810 (custom-push-theme 'theme-value symbol 'user 'set value)
2804 (condition-case nil 2811 (condition-case nil
2805 (funcall set symbol (car value)) 2812 (funcall set symbol (car value))
2806 (error nil))) 2813 (error nil)))
@@ -3361,6 +3368,7 @@ Optional EVENT is the location for the menu."
3361 ;; face-set-spec ignores empty attribute lists, so just give it 3368 ;; face-set-spec ignores empty attribute lists, so just give it
3362 ;; something harmless instead. 3369 ;; something harmless instead.
3363 (face-spec-set symbol '((t :foreground unspecified)))) 3370 (face-spec-set symbol '((t :foreground unspecified))))
3371 (custom-push-theme 'theme-face symbol 'user 'set value)
3364 (put symbol 'customized-face-comment comment) 3372 (put symbol 'customized-face-comment comment)
3365 (put symbol 'face-comment comment) 3373 (put symbol 'face-comment comment)
3366 (custom-face-state-set widget) 3374 (custom-face-state-set widget)
@@ -3409,6 +3417,7 @@ Optional EVENT is the location for the menu."
3409 (error "No saved value for this face")) 3417 (error "No saved value for this face"))
3410 (put symbol 'customized-face nil) 3418 (put symbol 'customized-face nil)
3411 (put symbol 'customized-face-comment nil) 3419 (put symbol 'customized-face-comment nil)
3420 (custom-push-theme 'theme-face symbol 'user 'set value)
3412 (face-spec-set symbol value) 3421 (face-spec-set symbol value)
3413 (put symbol 'face-comment comment) 3422 (put symbol 'face-comment comment)
3414 (widget-value-set child value) 3423 (widget-value-set child value)
@@ -3432,16 +3441,12 @@ restoring it to the state of a face that has never been customized."
3432 (error "No standard setting for this face")) 3441 (error "No standard setting for this face"))
3433 (put symbol 'customized-face nil) 3442 (put symbol 'customized-face nil)
3434 (put symbol 'customized-face-comment nil) 3443 (put symbol 'customized-face-comment nil)
3444 (custom-push-theme 'theme-face symbol 'user 'reset nil)
3445 (custom-theme-recalc-face symbol)
3435 (when (or (get symbol 'saved-face) (get symbol 'saved-face-comment)) 3446 (when (or (get symbol 'saved-face) (get symbol 'saved-face-comment))
3436 (put symbol 'saved-face nil) 3447 (put symbol 'saved-face nil)
3437 (custom-push-theme 'theme-face symbol 'user 'reset nil)
3438 (custom-theme-recalc-face symbol)
3439 ;; Do not explictly save resets to standards without themes.
3440 (if (null (cdr (get symbol 'theme-face)))
3441 (put symbol 'theme-face nil))
3442 (put symbol 'saved-face-comment nil) 3448 (put symbol 'saved-face-comment nil)
3443 (custom-save-all)) 3449 (custom-save-all))
3444 (face-spec-set symbol value)
3445 (put symbol 'face-comment nil) 3450 (put symbol 'face-comment nil)
3446 (widget-value-set child value) 3451 (widget-value-set child value)
3447 ;; This call manages the comment visibility 3452 ;; This call manages the comment visibility