fix utop-process-output
Ignore-this: b28611f674ea8d0425f1e645508d71a2 darcs-hash:20110728145634-c41ad-35a498f358ef63497f032295366f17c4fd8b4a4f
This commit is contained in:
parent
7c645d9c69
commit
f01d238cd4
27
src/utop.el
27
src/utop.el
|
@ -236,19 +236,20 @@ non-sticky mode."
|
||||||
|
|
||||||
(defun utop-process-output (process output)
|
(defun utop-process-output (process output)
|
||||||
"Process the output of utop"
|
"Process the output of utop"
|
||||||
;; Concatenate the output with the output not yet processed
|
(with-current-buffer utop-buffer-name
|
||||||
(setq utop-output (concat utop-output output))
|
;; Concatenate the output with the output not yet processed
|
||||||
;; Split lines. Each line contains exactly one command
|
(setq utop-output (concat utop-output output))
|
||||||
(let ((lines (split-string utop-output "\n")))
|
;; Split lines. Each line contains exactly one command
|
||||||
(while (>= (length lines) 2)
|
(let ((lines (split-string utop-output "\n")))
|
||||||
;; Process the first line
|
(while (>= (length lines) 2)
|
||||||
(utop-process-line (car lines))
|
;; Process the first line
|
||||||
;; Remove it and continue
|
(utop-process-line (car lines))
|
||||||
(setq lines (cdr lines)))
|
;; Remove it and continue
|
||||||
;; When the list contains only one element, then this is either
|
(setq lines (cdr lines)))
|
||||||
;; the end of commands, either an unterminated one, so we save
|
;; When the list contains only one element, then this is either
|
||||||
;; it for later
|
;; the end of commands, either an unterminated one, so we save
|
||||||
(setq utop-output (car lines))))
|
;; it for later
|
||||||
|
(setq utop-output (car lines)))))
|
||||||
|
|
||||||
;; +-----------------------------------------------------------------+
|
;; +-----------------------------------------------------------------+
|
||||||
;; | Sending data to the utop sub-process |
|
;; | Sending data to the utop sub-process |
|
||||||
|
|
Loading…
Reference in New Issue