]> code.delx.au - gnu-emacs/commitdiff
Unbreak the build
authorDaniel Colascione <dancol@dancol.org>
Sat, 24 May 2014 19:51:52 +0000 (12:51 -0700)
committerDaniel Colascione <dancol@dancol.org>
Sat, 24 May 2014 19:51:52 +0000 (12:51 -0700)
* lisp/emacs-lisp/nadvice.el (defun): Write in eval-and-compile to avoid
breaking the build.

lisp/ChangeLog
lisp/emacs-lisp/nadvice.el

index b786027f76df8f6c3942bb776aff725584dd2437..a14af45cc7431b8bf0b3d39ce6eb348af08fe9f4 100644 (file)
@@ -1,3 +1,8 @@
+2014-05-24  Daniel Colascione  <dancol@dancol.org>
+
+       * emacs-lisp/nadvice.el (defun): Write in eval-and-compile to avoid
+       breaking the build.
+
 2014-05-24  Leo Liu  <sdl.web@gmail.com>
 
        * calc/calc.el (math-bignum): Handle most-negative-fixnum.  (Bug#17556)
index 01027c43148bda8755e01587a0738b243f9d6912..66a4f8fdea77df8d2148f50060b492593339e477 100644 (file)
@@ -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)