emacs-diffs
[Top][All Lists]
Advanced

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

emacs-27 986c12b 3/4: ; * lisp/so-long.el: Byte-compilation bug fix


From: Phil
Subject: emacs-27 986c12b 3/4: ; * lisp/so-long.el: Byte-compilation bug fix
Date: Mon, 3 Aug 2020 09:56:50 -0400 (EDT)

branch: emacs-27
commit 986c12b20fa29c37f13563846fddf6edcd0b4945
Author: Phil Sainty <psainty@orcon.net.nz>
Commit: Phil Sainty <psainty@orcon.net.nz>

    ; * lisp/so-long.el: Byte-compilation bug fix
    
    As this `require' is not at the top-level (it is only conditionally
    evaluated, when loading the library over the top of an earlier
    version), we need `eval-and-compile' to ensure that both macros and
    functions from advice.el are accounted for.
---
 lisp/so-long.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/so-long.el b/lisp/so-long.el
index b3596bd..21dc7de 100644
--- a/lisp/so-long.el
+++ b/lisp/so-long.el
@@ -1819,9 +1819,10 @@ If it appears in `%s', you should remove it."
   ;; Update to version 1.0 from earlier versions:
   (when (version< so-long-version "1.0")
     (remove-hook 'change-major-mode-hook 'so-long-change-major-mode)
-    (require 'advice)
+    (eval-and-compile (require 'advice)) ;; Both macros and functions.
     (declare-function ad-find-advice "advice")
     (declare-function ad-remove-advice "advice")
+    (declare-function ad-activate "advice")
     (when (ad-find-advice 'hack-local-variables 'after 
'so-long--file-local-mode)
       (ad-remove-advice 'hack-local-variables 'after 'so-long--file-local-mode)
       (ad-activate 'hack-local-variables))



reply via email to

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