additions to support clojure/clojpuyter

This commit is contained in:
Peter Denno 2019-08-12 10:06:16 -04:00
parent cfd7a9a117
commit 23faf4a3f5

View file

@ -34,6 +34,7 @@
(require 'python)
(require 'ess-r-mode nil t)
(require 'ess-custom nil t)
(require 'clojure-mode nil t)
(declare-function ess-indent-line "ess")
(declare-function ess-r-eldoc-function "ess-r-completion")
@ -142,6 +143,19 @@ 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 ()
"A naive combination of the python and R setups with things from clojure-mode.el"
(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-R ()
(when (and (featurep 'ess-r-mode) (featurep 'ess-custom))
(setq-local mode-name "EIN[R]")