[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 61f8c23 1/2: Minor advice.el fix
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] master 61f8c23 1/2: Minor advice.el fix |
Date: |
Mon, 12 Dec 2016 20:21:52 +0000 (UTC) |
branch: master
commit 61f8c2386c29fe44d7ebf6fa816f140a2d918110
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>
Minor advice.el fix
* 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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index c0da59c..b621ac5 100644
--- a/lisp/emacs-lisp/advice.el
+++ b/lisp/emacs-lisp/advice.el
@@ -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)))))