mirror of
https://github.com/vale981/py-vterm-interaction.el
synced 2025-03-04 17:41:40 -05:00
Add julia-vterm-fellow-repl-buffer-status
Bump version to 0.14
This commit is contained in:
parent
d02c8ffbd8
commit
d36dde1c7e
1 changed files with 15 additions and 1 deletions
|
@ -7,7 +7,7 @@
|
|||
;; Created: March 11, 2020
|
||||
;; URL: https://github.com/shg/julia-vterm.el
|
||||
;; Package-Requires: ((emacs "25.1") (vterm "0.0.1"))
|
||||
;; Version: 0.13
|
||||
;; Version: 0.14
|
||||
;; Keywords: languages, julia
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
@ -279,6 +279,20 @@ With a prefix argument ARG (or interactively C-u), use Revise.includet() instead
|
|||
|
||||
(defalias 'julia-vterm-sync-wd 'julia-vterm-send-cd-to-buffer-directory)
|
||||
|
||||
(defun julia-vterm-fellow-repl-buffer-status ()
|
||||
"Return REPL mode or nil if REPL is not ready for input."
|
||||
(with-current-buffer (julia-vterm-fellow-repl-buffer)
|
||||
(let ((tail (substring (buffer-string) -64)))
|
||||
(set-text-properties 0 (length tail) nil tail)
|
||||
(let* ((lines (split-string (string-trim-right tail "[\t\n\r]+")
|
||||
(char-to-string ?\n)))
|
||||
(prompt (car (last lines))))
|
||||
(pcase prompt
|
||||
("julia> " :julia)
|
||||
("help?> " :help)
|
||||
((rx "(@v" (1+ (in "0-9.")) ") pkg> ") :pkg)
|
||||
("shell> " :shell))))))
|
||||
|
||||
(unless (fboundp 'julia)
|
||||
(defalias 'julia 'julia-vterm-repl))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue