Skip to content

Commit 6268b2a

Browse files
committed
defvar some variables to avoid elisp warnings
1 parent 4c10144 commit 6268b2a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

solidity-mode.el

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@
5555
map)
5656
"Keymap for solidity major mode.")
5757

58+
(defvar solidity-checker t "The solidity flycheck syntax checker.")
59+
(defvar solidity-mode t "The solidity major mode.")
60+
(defvar flycheck-solidity-executable t "The solc executable used by flycheck.")
61+
5862
;;;###autoload
5963
(add-to-list 'auto-mode-alist '("\\.sol\\'" . solidity-mode))
6064

@@ -382,14 +386,14 @@ Highlight the 1st result."
382386
(when (require 'flycheck nil 'noerror)
383387
;; add a solidity mode callback to set the executable of solc for flycheck
384388
;; define solidity's flycheck syntax checker
385-
(flycheck-define-checker solidity
389+
(flycheck-define-checker solidity-checker
386390
"A Solidity syntax checker using the solc compiler"
387391
:command ("/usr/bin/solc" source-inplace)
388392
:error-patterns
389393
((error line-start (file-name) ":" line ":" column ":" " Error: " (message)))
390394
:modes solidity-mode
391395
:predicate (lambda () (eq major-mode 'solidity-mode)))
392-
(add-to-list 'flycheck-checkers 'solidity)
396+
(add-to-list 'flycheck-checkers 'solidity-checker)
393397
(add-hook 'solidity-mode-hook
394398
(lambda () (setq flycheck-solidity-executable solidity-solc-path))))
395399

0 commit comments

Comments
 (0)