chore(emacs): move lean-choose-minor-mode-based-on-extension to lean-util.el
This commit is contained in:
parent
dcee8ddb1f
commit
46d99c8077
2 changed files with 10 additions and 10 deletions
|
@ -152,16 +152,6 @@ enabled and disabled respectively.")
|
||||||
(add-to-list 'lean-hooks-alist '(after-change-functions . lean-after-change-function))
|
(add-to-list 'lean-hooks-alist '(after-change-functions . lean-after-change-function))
|
||||||
(add-to-list 'lean-hooks-alist '(before-change-functions . lean-before-change-function)))
|
(add-to-list 'lean-hooks-alist '(before-change-functions . lean-before-change-function)))
|
||||||
|
|
||||||
(defun lean-choose-minor-mode-based-on-extension ()
|
|
||||||
;; Based on the extension of buffer, return either 'HoTT or 'Standard
|
|
||||||
(interactive)
|
|
||||||
(let ((file-name (buffer-file-name)))
|
|
||||||
(cond ((s-ends-with? ".lean" file-name)
|
|
||||||
'Standard)
|
|
||||||
((s-ends-with? ".hlean" file-name)
|
|
||||||
'HoTT)
|
|
||||||
(t 'Standard))))
|
|
||||||
|
|
||||||
(defun lean-mode-setup ()
|
(defun lean-mode-setup ()
|
||||||
"Default lean-mode setup"
|
"Default lean-mode setup"
|
||||||
;; Flycheck
|
;; Flycheck
|
||||||
|
|
|
@ -184,4 +184,14 @@
|
||||||
(when lean-delete-trailing-whitespace
|
(when lean-delete-trailing-whitespace
|
||||||
(delete-trailing-whitespace)))
|
(delete-trailing-whitespace)))
|
||||||
|
|
||||||
|
(defun lean-choose-minor-mode-based-on-extension ()
|
||||||
|
;; Based on the extension of buffer, return either 'hott or 'standard
|
||||||
|
(interactive)
|
||||||
|
(let ((file-name (buffer-file-name)))
|
||||||
|
(cond ((s-ends-with? ".lean" file-name)
|
||||||
|
'standard)
|
||||||
|
((s-ends-with? ".hlean" file-name)
|
||||||
|
'hott)
|
||||||
|
(t 'standard))))
|
||||||
|
|
||||||
(provide 'lean-util)
|
(provide 'lean-util)
|
||||||
|
|
Loading…
Reference in a new issue