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

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

[elpa] elpa-admin c5f846dc95: * elpa-admin.el (elpaa--metadata): Fix adv


From: Stefan Monnier
Subject: [elpa] elpa-admin c5f846dc95: * elpa-admin.el (elpaa--metadata): Fix advice removal
Date: Wed, 2 Nov 2022 14:53:36 -0400 (EDT)

branch: elpa-admin
commit c5f846dc9540ca40fef1e5bac0a2915004e762ef
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * elpa-admin.el (elpaa--metadata): Fix advice removal
---
 elpa-admin.el | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index c78cd04020..e0149bac72 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -1144,18 +1144,19 @@ PKG is the name of the package and DIR is the directory 
where it is."
       (with-temp-buffer
        (insert-file-contents mainfile)
        (goto-char (point-min))
-        (let* ((pkg-desc
+        (let* ((lmheader-advice
+                (when (or (plist-get (cdr pkg-spec) :version-map)
+                          (plist-get (cdr pkg-spec) :dont-release))
+                  (apply-partially
+                   #'elpaa--override-version
+                   pkg-spec)))
+               (pkg-desc
                 (unwind-protect
                     (progn
-                      (when (or (plist-get (cdr pkg-spec) :version-map)
-                                (plist-get (cdr pkg-spec) :dont-release))
-                        (advice-add 'lm-header :around
-                                    (apply-partially
-                                     #'elpaa--override-version
-                                     pkg-spec)))
+                      (when lmheader-advice
+                        (advice-add 'lm-header :around lmheader-advice))
                       (package-buffer-info))
-                  (advice-remove 'lm-header
-                                 #'elpaa--override-version)))
+                  (advice-remove 'lm-header lmheader-advice)))
                (extras (package-desc-extras pkg-desc))
                (version (package-desc-version pkg-desc))
                (keywords (lm-keywords-list))



reply via email to

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