lang/julia: operator highlights for ess-julia-mode

And adjust REPL handler to return the repl buffer.
This commit is contained in:
Henrik Lissner 2019-02-15 19:42:36 -05:00
parent 4c4c0a451f
commit 0edeafadcf
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 23 additions and 24 deletions

View file

@ -9,6 +9,5 @@
(apply #'make-comint-in-buffer "Julia" "*Julia*" julia-program julia-arguments)) (apply #'make-comint-in-buffer "Julia" "*Julia*" julia-program julia-arguments))
(pop-to-buffer buffer) (pop-to-buffer buffer)
(with-current-buffer buffer (with-current-buffer buffer
(inferior-julia-mode)))) (inferior-julia-mode))
buffer))

View file

@ -7,24 +7,24 @@
;; Borrow matlab.el's fontification of math operators ;; Borrow matlab.el's fontification of math operators
;; From <https://ogbe.net/emacsconfig.html> ;; From <https://ogbe.net/emacsconfig.html>
(font-lock-add-keywords (dolist (mode '(julia-mode ess-julia-mode))
'julia-mode (font-lock-add-keywords
`((,(let ((OR "\\|")) mode
(concat "\\(" ;; stolen `matlab.el' operators first `((,(let ((OR "\\|"))
"[<>!]=?" OR (concat "\\(" ;; stolen `matlab.el' operators first
"\\.[/*^']" OR "[<>!]=?" OR
"==" OR "\\.[/*^']" OR
"=>" OR "==" OR
"\\<xor\\>" OR "=>" OR
"[-+*\\/^&|$]=?" OR ;; this has to come before next (updating operators) "\\<xor\\>" OR
"[-!^&|*+\\/~:]" OR "[-+*\\/^&|$]=?" OR ;; this has to come before next (updating operators)
;; more extra julia operators follow "[-!^&|*+\\/~:]" OR
"[%$]" OR ;; more extra julia operators follow
;; bitwise operators "[%$]" OR
">>>" OR ">>" OR "<<" OR ;; bitwise operators
">>>=" OR ">>" OR "<<" OR ">>>" OR ">>" OR "<<" OR
;; comparison ">>>=" OR ">>" OR "<<" OR
"[<>!]=?" OR ;; comparison
"\\)")) "[<>!]=?" OR
1 font-lock-type-face)))) "\\)"))
1 font-lock-type-face)))))