summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/advice.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/advice.el')
-rw-r--r--lisp/emacs-lisp/advice.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/advice.el b/lisp/emacs-lisp/advice.el
index c0da59c81cb..b621ac507da 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)))))