parent
661290e8d7
commit
4761a7635a
3 changed files with 16 additions and 10 deletions
|
@ -1,13 +1,15 @@
|
||||||
;;; lang/julia/autoload.el -*- lexical-binding: t; -*-
|
;;; lang/julia/autoload.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +julia/repl ()
|
(defun +julia/open-repl ()
|
||||||
"Run an inferior instance of `julia' inside Emacs."
|
"Run an inferior instance of `julia' inside Emacs."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((buffer (get-buffer-create "*Julia*")))
|
(if (require 'julia-repl nil t)
|
||||||
(unless (comint-check-proc "*Julia*")
|
(julia-repl)
|
||||||
(apply #'make-comint-in-buffer "Julia" "*Julia*" julia-program julia-arguments))
|
(let ((buffer (get-buffer-create "*Julia*")))
|
||||||
(pop-to-buffer buffer)
|
(unless (comint-check-proc "*Julia*")
|
||||||
(with-current-buffer buffer
|
(apply #'make-comint-in-buffer "Julia" "*Julia*" julia-program julia-arguments))
|
||||||
(inferior-julia-mode))
|
(pop-to-buffer buffer)
|
||||||
buffer))
|
(with-current-buffer buffer
|
||||||
|
(inferior-julia-mode))
|
||||||
|
buffer)))
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
(use-package! julia-mode
|
(use-package! julia-mode
|
||||||
:interpreter "julia"
|
:interpreter "julia"
|
||||||
:config
|
:config
|
||||||
(set-repl-handler! 'julia-mode #'+julia/repl)
|
(set-repl-handler! 'julia-mode #'+julia/open-repl)
|
||||||
|
|
||||||
;; 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>
|
||||||
|
@ -28,3 +28,7 @@
|
||||||
"[<>!]=?" OR
|
"[<>!]=?" OR
|
||||||
"\\)"))
|
"\\)"))
|
||||||
1 font-lock-type-face)))))
|
1 font-lock-type-face)))))
|
||||||
|
|
||||||
|
|
||||||
|
(after! julia-repl
|
||||||
|
(add-hook 'julia-repl-hook #'julia-repl-use-emacsclient))
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
;;; lang/julia/packages.el
|
;;; lang/julia/packages.el
|
||||||
|
|
||||||
(package! julia-mode)
|
(package! julia-mode)
|
||||||
|
(package! julia-repl)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue