forked from twisted/twisted
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanhole.el
29 lines (25 loc) · 1003 Bytes
/
manhole.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
;;this is all based on ielm.el -- i was planning to copy
;;inferior-emacs-lisp-mode as verbatim as possible and just swap
;;function names round, and bringing in the python
;;syntax table. obviously we send commands to the manhole server
;;instead of locally evaling, so you can ignore all the ! ! !!!
;;silliness. we probably want to only support one instance of this running
;;at once, so use globals to your heart's content ;)
(require 'pb)
(defvar manhole-prompt "manhole> ")
(defun manhole (host port)
(interactive "sManhole connection to: i")
)
(defvar manhole-input)
(defun manhole-input-sender (proc input)
(setq manhole-input input))
(defun manhole-send-input ()
(interactive)
(let ((buf (current-buffer))
manhole-input)
(comint-send-input)
(funcall manhole-server "do" (list manhole-input) nil #'manhole-output)))
(defun manhole-output (output)
; mung output pairs here....
(comint-output-filter manhole-process ) ;
(princ manhole-prompt manhole-buffer))