diff options
| author | Stefan Monnier | 2009-09-15 04:08:02 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2009-09-15 04:08:02 +0000 |
| commit | b3c7c12d65aa8e806975b73ef4673f52d7883429 (patch) | |
| tree | 73944a50da8ee075af0082a72840224cc8224542 | |
| parent | 13dc2bc2e89d4a7e2edbabd2f4cf33e77bcf8b74 (diff) | |
| download | emacs-b3c7c12d65aa8e806975b73ef4673f52d7883429.tar.gz emacs-b3c7c12d65aa8e806975b73ef4673f52d7883429.zip | |
(custom-initialize-default, custom-initialize-set): CSE.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/custom.el | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eeb90cb28c5..35eff3c3b98 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2009-09-15 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2009-09-15 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * custom.el (custom-initialize-default, custom-initialize-set): CSE. | ||
| 4 | |||
| 3 | * desktop.el (desktop-path): Check user-emacs-directory. | 5 | * desktop.el (desktop-path): Check user-emacs-directory. |
| 4 | 6 | ||
| 5 | * emacs-lisp/bytecomp.el (byte-compile-refresh-preloaded): New function. | 7 | * emacs-lisp/bytecomp.el (byte-compile-refresh-preloaded): New function. |
diff --git a/lisp/custom.el b/lisp/custom.el index f55cd47afc0..e3d3d9a63a0 100644 --- a/lisp/custom.el +++ b/lisp/custom.el | |||
| @@ -57,9 +57,9 @@ Otherwise, VALUE will be evaluated and used as the default binding for | |||
| 57 | symbol." | 57 | symbol." |
| 58 | (unless (default-boundp symbol) | 58 | (unless (default-boundp symbol) |
| 59 | ;; Use the saved value if it exists, otherwise the standard setting. | 59 | ;; Use the saved value if it exists, otherwise the standard setting. |
| 60 | (set-default symbol (if (get symbol 'saved-value) | 60 | (set-default symbol (eval (if (get symbol 'saved-value) |
| 61 | (eval (car (get symbol 'saved-value))) | 61 | (car (get symbol 'saved-value)) |
| 62 | (eval value))))) | 62 | value))))) |
| 63 | 63 | ||
| 64 | (defun custom-initialize-set (symbol value) | 64 | (defun custom-initialize-set (symbol value) |
| 65 | "Initialize SYMBOL based on VALUE. | 65 | "Initialize SYMBOL based on VALUE. |
| @@ -70,9 +70,9 @@ if any, or VALUE." | |||
| 70 | (unless (default-boundp symbol) | 70 | (unless (default-boundp symbol) |
| 71 | (funcall (or (get symbol 'custom-set) 'set-default) | 71 | (funcall (or (get symbol 'custom-set) 'set-default) |
| 72 | symbol | 72 | symbol |
| 73 | (if (get symbol 'saved-value) | 73 | (eval (if (get symbol 'saved-value) |
| 74 | (eval (car (get symbol 'saved-value))) | 74 | (car (get symbol 'saved-value)) |
| 75 | (eval value))))) | 75 | value))))) |
| 76 | 76 | ||
| 77 | (defun custom-initialize-reset (symbol value) | 77 | (defun custom-initialize-reset (symbol value) |
| 78 | "Initialize SYMBOL based on VALUE. | 78 | "Initialize SYMBOL based on VALUE. |