diff options
| author | Stefan Monnier | 2015-02-09 10:49:43 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2015-02-09 10:49:43 -0500 |
| commit | 699ece275727be4ce452cdc43fe09fd7d8f8034c (patch) | |
| tree | 9a22451069df9828211f10d31ed6c936f6393c69 | |
| parent | af560cd6f15e7cc7e42bff5b3c802b9d1d1640b5 (diff) | |
| download | emacs-699ece275727be4ce452cdc43fe09fd7d8f8034c.tar.gz emacs-699ece275727be4ce452cdc43fe09fd7d8f8034c.zip | |
* lisp/emacs-lisp/eieio-core.el (eieio-oset-default): Catch the unexpected
case where the default value would be re-interpreted as a form!
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/eieio-core.el | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9ca0c306e44..d9024982807 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2015-02-09 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/eieio-core.el (eieio-oset-default): Catch the unexpected | ||
| 4 | case where the default value would be re-interpreted as a form! | ||
| 5 | |||
| 1 | 2015-02-09 Christopher Genovese <genovese@cmu.edu> (tiny change) | 6 | 2015-02-09 Christopher Genovese <genovese@cmu.edu> (tiny change) |
| 2 | 7 | ||
| 3 | * help-fns.el (help-fns--signature): Keep doc for keymap. | 8 | * help-fns.el (help-fns--signature): Keep doc for keymap. |
diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el index fa8fefa1df0..e71c54d4123 100644 --- a/lisp/emacs-lisp/eieio-core.el +++ b/lisp/emacs-lisp/eieio-core.el | |||
| @@ -1010,6 +1010,8 @@ Fills in the default value in CLASS' in SLOT with VALUE." | |||
| 1010 | (signal 'invalid-slot-name (list (eieio--class-symbol class) slot))) | 1010 | (signal 'invalid-slot-name (list (eieio--class-symbol class) slot))) |
| 1011 | (eieio--validate-slot-value class c value slot) | 1011 | (eieio--validate-slot-value class c value slot) |
| 1012 | ;; Set this into the storage for defaults. | 1012 | ;; Set this into the storage for defaults. |
| 1013 | (if (eieio-eval-default-p value) | ||
| 1014 | (error "Can't set default to a sexp that gets evaluated again")) | ||
| 1013 | (setcar (nthcdr (- c (eval-when-compile eieio--object-num-slots)) | 1015 | (setcar (nthcdr (- c (eval-when-compile eieio--object-num-slots)) |
| 1014 | (eieio--class-public-d class)) | 1016 | (eieio--class-public-d class)) |
| 1015 | value) | 1017 | value) |