summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Sainty <psainty@orcon.net.nz>2020-07-04 01:43:08 +1200
committerPhil Sainty <psainty@orcon.net.nz>2020-08-04 01:44:53 +1200
commit986c12b20fa29c37f13563846fddf6edcd0b4945 (patch)
tree3a0e2c5ec3dc93fce9cae5c9d3b3ff6542f8bf0e
parent19f8f36f11cf5ae62a7b92dc1496c72db4d377b3 (diff)
downloademacs-986c12b20fa29c37f13563846fddf6edcd0b4945.tar.gz
; * 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.
-rw-r--r--lisp/so-long.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/so-long.el b/lisp/so-long.el
index b3596bdab7b..21dc7de75c8 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))