branch: master
commit fe18f577d95221a743e117dd840506fb415e0e77
Author: Stefan Monnier <[email protected]>
Commit: Stefan Monnier <[email protected]>

    * nadvice.el: ad-remove-advice is not autoloaded
---
 packages/nadvice/nadvice.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/packages/nadvice/nadvice.el b/packages/nadvice/nadvice.el
index af0ec8f..853f748 100644
--- a/packages/nadvice/nadvice.el
+++ b/packages/nadvice/nadvice.el
@@ -4,7 +4,7 @@
 
 ;; Author: Stefan Monnier <[email protected]>
 ;; Version: 0.2
-;; Keywords: 
+;; Keywords:
 
 ;; This program is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -36,11 +36,17 @@
 
 ;;; Code:
 
+(declare-function ad-remove-advice "advice")
+
 (unless (fboundp 'add-function)
   ;; If `add-function' is defined, we're presumably running on
   ;; an Emacs that comes with the real nadvice.el, so let's be careful
   ;; to do nothing in that case!
 
+  ;; Load `advice' manually, in case `advice-remove' is called first,
+  ;; since ad-remove-advice is not autoloaded.
+  (require 'advice)
+
 ;;;###autoload
 (defun advice-add (symbol where function &optional props)
   (when props

Reply via email to