feat(emacs): use optional package when required
This commit is contained in:
parent
e0bc5915fb
commit
b6b40bb4ab
2 changed files with 6 additions and 5 deletions
|
@ -4,6 +4,8 @@
|
||||||
;; Author: Soonho Kong
|
;; Author: Soonho Kong
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
(require 'flycheck)
|
||||||
|
|
||||||
(setq-local lean-lmake-name "lmake")
|
(setq-local lean-lmake-name "lmake")
|
||||||
(setq-local lean-lmake-options "--flycheck")
|
(setq-local lean-lmake-options "--flycheck")
|
||||||
(eval
|
(eval
|
||||||
|
|
|
@ -8,9 +8,6 @@
|
||||||
(require 'generic-x)
|
(require 'generic-x)
|
||||||
(require 'compile)
|
(require 'compile)
|
||||||
(require 'flymake)
|
(require 'flymake)
|
||||||
(require 'flycheck)
|
|
||||||
(require 'fill-column-indicator)
|
|
||||||
(require 'whitespace-cleanup-mode)
|
|
||||||
(require 'lean-util)
|
(require 'lean-util)
|
||||||
(require 'lean-settings)
|
(require 'lean-settings)
|
||||||
(require 'lean-flycheck)
|
(require 'lean-flycheck)
|
||||||
|
@ -84,10 +81,12 @@
|
||||||
(when (and lean-rule-column
|
(when (and lean-rule-column
|
||||||
lean-show-rule-column-method)
|
lean-show-rule-column-method)
|
||||||
(cl-case lean-show-rule-column-method
|
(cl-case lean-show-rule-column-method
|
||||||
('vline (setq fci-rule-column lean-rule-column)
|
('vline (require 'fill-column-indicator)
|
||||||
|
(setq fci-rule-column lean-rule-column)
|
||||||
(add-hook 'lean-mode-hook 'fci-mode))))
|
(add-hook 'lean-mode-hook 'fci-mode))))
|
||||||
(if lean-delete-trailing-whitespace
|
(if lean-delete-trailing-whitespace
|
||||||
(add-hook 'lean-mode-hook 'whitespace-cleanup-mode)
|
(progn (require 'whitespace-cleanup-mode)
|
||||||
|
(add-hook 'lean-mode-hook 'whitespace-cleanup-mode))
|
||||||
(remove-hook 'lean-mode-hook 'whitespace-cleanup-mode))
|
(remove-hook 'lean-mode-hook 'whitespace-cleanup-mode))
|
||||||
))
|
))
|
||||||
"A mode for Lean files" ;; doc string for this mode
|
"A mode for Lean files" ;; doc string for this mode
|
||||||
|
|
Loading…
Reference in a new issue