diff options
author | Glenn Morris <[email protected]> | 2007-10-12 02:56:39 +0000 |
---|---|---|
committer | Glenn Morris <[email protected]> | 2007-10-12 02:56:39 +0000 |
commit | e27e48b582a4a383a4912f3054cb5ab2da653acb (patch) | |
tree | 435389e5efe764bc8253e910f7f7b73a1d9ee581 /lisp | |
parent | dbffff5b06c438aae24f8143e5c771e009da093a (diff) |
(custom-variable-menu, custom-face-menu)
(custom-group-menu): Check init-file-user rather than
user-init-file, in case cus-edit is loaded by site-run-file.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/cus-edit.el | 17 |
2 files changed, 17 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 21ae5b78d6..1cfef0ed73 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2007-10-12 Glenn Morris <[email protected]> + + * cus-edit.el (custom-variable-menu, custom-face-menu) + (custom-group-menu): Check init-file-user rather than + user-init-file, in case cus-edit is loaded by site-run-file. + 2007-10-11 Juanma Barranquero <[email protected]> * follow.el (follow-stop-intercept-process-output): diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 1d616cbb02..5b5a269a0c 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -2744,7 +2744,12 @@ try matching its doc string against `custom-guess-doc-alist'." `(("Set for Current Session" custom-variable-set (lambda (widget) (eq (widget-get widget :custom-state) 'modified))) - ,@(when (or custom-file user-init-file) + ;; Note that in all the backquoted code in this file, we test + ;; init-file-user rather than user-init-file. This is in case + ;; cus-edit is loaded by something in site-start.el, because + ;; user-init-file is not set at that stage. + ;; http://lists.gnu.org/archive/html/emacs-devel/2007-10/msg00310.html + ,@(when (or custom-file init-file-user) '(("Save for Future Sessions" custom-variable-save (lambda (widget) (memq (widget-get widget :custom-state) @@ -2759,7 +2764,7 @@ try matching its doc string against `custom-guess-doc-alist'." (get (widget-value widget) 'saved-variable-comment)) (memq (widget-get widget :custom-state) '(modified set changed rogue))))) - ,@(when (or custom-file user-init-file) + ,@(when (or custom-file init-file-user) '(("Erase Customization" custom-variable-reset-standard (lambda (widget) (and (get (widget-value widget) 'standard-value) @@ -3416,7 +3421,7 @@ SPEC must be a full face spec." (defvar custom-face-menu `(("Set for Current Session" custom-face-set) - ,@(when (or custom-file user-init-file) + ,@(when (or custom-file init-file-user) '(("Save for Future Sessions" custom-face-save))) ("Undo Edits" custom-redraw (lambda (widget) @@ -3425,7 +3430,7 @@ SPEC must be a full face spec." (lambda (widget) (or (get (widget-value widget) 'saved-face) (get (widget-value widget) 'saved-face-comment)))) - ,@(when (or custom-file user-init-file) + ,@(when (or custom-file init-file-user) '(("Erase Customization" custom-face-reset-standard (lambda (widget) (get (widget-value widget) 'face-defface-spec))))) @@ -4025,7 +4030,7 @@ Creating group members... %2d%%" `(("Set for Current Session" custom-group-set (lambda (widget) (eq (widget-get widget :custom-state) 'modified))) - ,@(when (or custom-file user-init-file) + ,@(when (or custom-file init-file-user) '(("Save for Future Sessions" custom-group-save (lambda (widget) (memq (widget-get widget :custom-state) '(modified set)))))) @@ -4035,7 +4040,7 @@ Creating group members... %2d%%" ("Reset to Saved" custom-group-reset-saved (lambda (widget) (memq (widget-get widget :custom-state) '(modified set)))) - ,@(when (or custom-file user-init-file) + ,@(when (or custom-file init-file-user) '(("Erase Customization" custom-group-reset-standard (lambda (widget) (memq (widget-get widget :custom-state) '(modified set saved))))))) |