emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/nadvice 040b27d 5/9: * nadvice.el: ad-remove-advice is


From: Stefan Monnier
Subject: [elpa] externals/nadvice 040b27d 5/9: * nadvice.el: ad-remove-advice is not autoloaded
Date: Tue, 1 Dec 2020 16:29:04 -0500 (EST)

branch: externals/nadvice
commit 040b27df7f7e08fd5622796bb6d0ec9680853627
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

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

diff --git a/nadvice.el b/nadvice.el
index af0ec8f..853f748 100644
--- a/nadvice.el
+++ b/nadvice.el
@@ -4,7 +4,7 @@
 
 ;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
 ;; 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

[Prev in Thread] Current Thread [Next in Thread]