mirror of
https://github.com/vale981/py-vterm-interaction.el
synced 2025-03-04 17:41:40 -05:00
Merge branch 'filter'
- Bump version to 0.15
This commit is contained in:
commit
443924f6eb
1 changed files with 15 additions and 2 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.14
|
||||
;; Version: 0.15
|
||||
;; Keywords: languages, julia
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
@ -108,7 +108,8 @@ recreated."
|
|||
(let ((buffer (generate-new-buffer (julia-vterm-repl-buffer-name session-name)))
|
||||
(vterm-shell julia-vterm-repl-program))
|
||||
(with-current-buffer buffer
|
||||
(julia-vterm-repl-mode))
|
||||
(julia-vterm-repl-mode)
|
||||
(add-function :filter-args (process-filter vterm--process) #'julia-vterm-repl-run-filter-functions))
|
||||
buffer)))
|
||||
|
||||
(defun julia-vterm-repl-buffer (&optional session-name restart)
|
||||
|
@ -145,6 +146,18 @@ If there's already one with the process alive, just open it."
|
|||
(goto-char (point-min))
|
||||
(vterm-clear 1)))
|
||||
|
||||
(defvar-local julia-vterm-repl-filter-functions '()
|
||||
"List of filter functions that process the output to the REPL buffer.")
|
||||
|
||||
(defun julia-vterm-repl-run-filter-functions (args)
|
||||
"Run registered filter functions with ARGS."
|
||||
(let ((proc (car args))
|
||||
(str (cadr args)))
|
||||
(let ((funcs julia-vterm-repl-filter-functions))
|
||||
(while funcs
|
||||
(setq str (apply (pop funcs) (list str))))
|
||||
(list proc str))))
|
||||
|
||||
(defvar julia-vterm-repl-copy-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map (kbd "C-c C-t") #'julia-vterm-repl-copy-mode)
|
||||
|
|
Loading…
Add table
Reference in a new issue