Merge pull request #620 from millejoh/pdenno-clojure

Pdenno clojure
This commit is contained in:
John Miller 2019-11-17 17:12:40 -06:00 committed by GitHub
commit da378d518a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

1
Cask
View file

@ -21,6 +21,7 @@
(depends-on "smartrep")
(depends-on "polymode")
(depends-on "markdown-mode")
(depends-on "clojure-mode")
(depends-on "julia-mode")
(depends-on "undo-tree")
(depends-on "ess")

View file

@ -33,6 +33,7 @@
(require 'python)
(require 'ess-r-mode nil t)
(require 'ess-custom nil t)
(require 'clojure-mode nil t)
(require 'julia-mode nil t)
(declare-function ess-indent-line "ess")
@ -142,6 +143,20 @@ This function may raise an error."
(set-syntax-table python-mode-syntax-table)
(set-keymap-parent ein:notebook-multilang-mode-map python-mode-map))
(defun ein:ml-lang-setup-clojure ()
"Minimally different than the the python setup"
(when (featurep 'clojure-mode)
(setq-local mode-name "EIN[Clj]")
(setq-local comment-start "; ")
(setq-local comment-start-skip ";+\\s-*")
(setq-local parse-sexp-lookup-properties t)
(setq-local indent-line-function
(apply-partially #'ein:ml-indent-line-function #'clojure-indent-line))
(setq-local indent-region-function
(apply-partially #'ein:ml-indent-region #'clojure-indent-region))
(set-syntax-table clojure-mode-syntax-table)
(set-keymap-parent ein:notebook-multilang-mode-map clojure-mode-map)))
(defun ein:ml-lang-setup-julia ()
(when (featurep 'julia-mode)
(setq-local mode-name "EIN[julia]")