diff options
author | Daniel Colascione <dancol@dancol.org> | 2014-05-24 12:51:52 -0700 |
---|---|---|
committer | Daniel Colascione <dancol@dancol.org> | 2014-05-24 12:51:52 -0700 |
commit | 8bb17f6471522c30630d0571a8b31d09554a17c2 (patch) | |
tree | 20b7c759535855a36a057aa1e41680760bb48a38 /lisp/emacs-lisp | |
parent | ec774634839b0d6ea52f96e272954bdbb5cd9726 (diff) | |
download | emacs-8bb17f6471522c30630d0571a8b31d09554a17c2.tar.gz |
Unbreak the build
* lisp/emacs-lisp/nadvice.el (defun): Write in eval-and-compile to avoid
breaking the build.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/nadvice.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index 01027c43148..66a4f8fdea7 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el @@ -232,11 +232,12 @@ different, but `function-equal' will hopefully ignore those differences.") ;; This function acts like the t special value in buffer-local hooks. (lambda (&rest args) (apply (default-value var) args))))) -(defun advice--normalize-place (place) - (cond ((eq 'local (car-safe place)) `(advice--buffer-local ,@(cdr place))) - ((eq 'var (car-safe place)) (nth 1 place)) - ((symbolp place) `(default-value ',place)) - (t place))) +(eval-and-compile + (defun advice--normalize-place (place) + (cond ((eq 'local (car-safe place)) `(advice--buffer-local ,@(cdr place))) + ((eq 'var (car-safe place)) (nth 1 place)) + ((symbolp place) `(default-value ',place)) + (t place)))) ;;;###autoload (defmacro add-function (where place function &optional props) |