]> git.eshelyaron.com Git - emacs.git/commitdiff
Minor advice.el fix
authorGlenn Morris <rgm@gnu.org>
Mon, 12 Dec 2016 20:20:39 +0000 (15:20 -0500)
committerGlenn Morris <rgm@gnu.org>
Mon, 12 Dec 2016 20:20:39 +0000 (15:20 -0500)
* lisp/emacs-lisp/advice.el (ad-preactivate-advice):
Avoid setting the function definition of nil.
This was happening during bootstrap of org-compat.el,
apparently due to eager macro expansion of code behind
a (featurep 'xemacs) test.

lisp/emacs-lisp/advice.el

index c0da59c81cbe664e04639b089dad0b2869a33627..b621ac507da46fb8048687bc02dac0d1d06181e2 100644 (file)
@@ -2830,7 +2830,7 @@ advised definition from scratch."
                    (ad-get-cache-id function))))
       (ad-set-advice-info function old-advice-info)
       (advice-remove function advicefunname)
-      (fset advicefunname old-advice)
+      (if advicefunname (fset advicefunname old-advice))
       (if old-advice (advice-add function :around advicefunname)))))