; * 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.
This commit is contained in:
parent
19f8f36f11
commit
986c12b20f
1 changed files with 2 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue