mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-10 00:00:39 -08:00
Unbreak the build
* lisp/emacs-lisp/nadvice.el (defun): Write in eval-and-compile to avoid breaking the build.
This commit is contained in:
parent
ec77463483
commit
8bb17f6471
2 changed files with 11 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue