Skip to content

Commit 87b5182

Browse files
committed
Require missing packages for byte-compile build
1 parent f68b762 commit 87b5182

File tree

4 files changed

+17
-18
lines changed

4 files changed

+17
-18
lines changed

elixir-mode.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636

3737
;;; Code:
3838

39-
(require 'easymenu) ; for menubar features
40-
(require 'elixir-smie) ; syntax and indentation support
39+
(require 'easymenu) ; Elixir Mode menu definition
40+
(require 'elixir-smie) ; Syntax and indentation support
41+
(require 'pkg-info) ; Display Elixir Mode package version
4142

4243
(defgroup elixir nil
4344
"Major mode for editing Elixir code."

elixir-smie.el

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525

2626
;;; Code:
2727

28-
(require 'smie)
28+
(require 'smie) ; Simple minded indentation engine
29+
(require 'cl-lib) ; `cl-flet'
2930

3031
;; HACK: Patch for Emacs 24.3 smie that fix
3132
;; https://github.com/elixir-lang/emacs-elixir/issues/107.
@@ -66,10 +67,8 @@
6667
(rassoc next smie-closer-alist))))
6768
(smie-indent-calculate))))))))
6869

69-
;; FIXME: This is me being lazy. CL is a compile-time dep only.
70-
;; (But for now, there is no real file-compilation plot, so let's
71-
;; scrape by with the runtime dep.)
72-
(require 'cl)
70+
;; Declare variable that we need from the smie package
71+
(defvar smie--parent)
7372

7473
(defvar elixir-smie-verbose-p nil
7574
"Emit context information about the current syntax state.")

test/elixir-mode-indentation-test.el

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -809,14 +809,13 @@ end"
809809
(:tags '(indentation))
810810
"
811811
def foo do
812-
case is_string(x) do
812+
case is_string(x) do
813813
true ->
814-
x2 = \" one\"
815-
x <> x2
816-
817-
false ->
818-
x2 = \" two\"
814+
x2 = \" one\"
819815
x <> x2
816+
false ->
817+
x2 = \" two\"
818+
x <> x2
820819
end
821820
end"
822821
"
@@ -825,7 +824,6 @@ def foo do
825824
true ->
826825
x2 = \" one\"
827826
x <> x2
828-
829827
false ->
830828
x2 = \" two\"
831829
x <> x2

test/test-helper.el

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
;;; Code:
77

8-
(require 'ert-x)
8+
(require 'ert-x) ; `ert-with-test-buffer'
9+
(require 'cl-lib) ; `cl-defmacro'
910

1011
(message "Running tests on Emacs %s" emacs-version)
1112

@@ -19,15 +20,15 @@
1920

2021
;; Helpers
2122

22-
(defmacro* elixir-deftest (name args &body body)
23+
(cl-defmacro elixir-deftest (name args &body body)
2324
(declare (indent 2))
2425
`(ert-deftest ,(intern (format "elixir-ert-%s" name)) ()
2526
""
2627
,@args
2728
(let ((elixir-smie-verbose-p t))
2829
,@body)))
2930

30-
(defmacro* elixir-ert-with-test-buffer ((&rest args) initial-contents &body body)
31+
(cl-defmacro elixir-ert-with-test-buffer ((&rest args) initial-contents &body body)
3132
(declare (indent 2))
3233
`(ert-with-test-buffer (,@args)
3334
(elixir-mode)
@@ -45,7 +46,7 @@
4546
(goto-char (point-min))
4647
,@body))
4748

48-
(defmacro* elixir-def-indentation-test (name args initial-contents expected-output)
49+
(cl-defmacro elixir-def-indentation-test (name args initial-contents expected-output)
4950
(declare (indent 2))
5051
`(elixir-deftest ,name ,args
5152
(elixir-ert-with-test-buffer (:name ,(format "(Expected)" name))

0 commit comments

Comments
 (0)