Skip to content

Commit 0c281a9

Browse files
committed
fix(emacs): fix tests on Emacs 27
use-package broke on Emacs 27 [1], breaking our Emacs plugin test script: ``` INFO Scraping files for track-changes-autoloads.el... track-changes-pkg.el:0:0: error: void-function: (lisp-data-mode) ``` Apply a workaround to keep our CI (which uses Emacs 27) green. [1] jwiegley/use-package#1083
1 parent 8836f07 commit 0c281a9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

plugin/emacs/test/quicklintjs-test.el

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
(require 'ert)
66
(require 'package)
77

8+
; https://github.com/jwiegley/use-package/issues/1083#issuecomment-2735175731
9+
(unless (or (fboundp 'lisp-data-mode)
10+
(not enable-local-variables))
11+
;; Work around the fact that transient's autogenerated package header declares mode:
12+
;; lisp-data, which is only present in Emacs 28+, thus breaking the loading of deps
13+
(message "Old Emacs version, remapping lisp-data-mode")
14+
(defalias 'lisp-data-mode 'emacs-lisp-mode))
15+
816
(defconst cache-dir-name (concat
917
(expand-file-name default-directory)
1018
".melpa-cache/"))

0 commit comments

Comments
 (0)