[slime-cvs] CVS slime
heller
heller at common-lisp.net
Wed Sep 17 06:21:18 UTC 2008
Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv24620
Modified Files:
slime.el
Log Message:
(slime-repl-insert-prompt): Don't move the output end makers
before prompt. Let output accumulate before the result.
(slime-insert-transcript-delimiter): Insert the delimiter
at the end of the buffer. Update markers accordingly.
--- /project/slime/cvsroot/slime/slime.el 2008/09/17 06:20:39 1.1020
+++ /project/slime/cvsroot/slime/slime.el 2008/09/17 06:21:16 1.1021
@@ -2667,16 +2667,25 @@
;; insert the string STRING in the output buffer
(with-current-buffer (slime-output-buffer)
(slime-with-output-end-mark
- (slime-insert-propertized '(face slime-repl-output-face
- rear-nonsticky (face))
- string)
- (set-marker slime-output-end (point))
+ (slime-repl-insert-at-markers slime-output-start slime-output-end
+ string '(face slime-repl-output-face
+ rear-nonsticky (face)))
+ (goto-char slime-output-end)
(when (and (= (point) slime-repl-prompt-start-mark)
(not (bolp)))
(insert "\n")
(set-marker slime-output-end (1- (point))))
- (when (< slime-repl-input-start-mark (point))
- (set-marker slime-repl-input-start-mark (point))))))
+ (assert (<= (point) slime-repl-input-start-mark)))))
+
+(defun slime-repl-insert-at-markers (marker1 marker2 string &optional props)
+ (goto-char marker2)
+ (let ((start (point)))
+ (insert-before-markers string)
+ (cond ((< marker1 marker2))
+ ((= marker1 marker2) (set-marker marker1 start))
+ (t (assert (<= marker1 marker2))))
+ (when props
+ (add-text-properties start marker2 props))))
(defun slime-repl-emit-result (string &optional bol)
;; insert STRING and mark it as evaluation result
@@ -2965,7 +2974,6 @@
(set-marker slime-repl-input-end-mark (point-max))
(set-marker slime-repl-prompt-start-mark prompt-start)
(goto-char slime-repl-prompt-start-mark)
- (slime-mark-output-start)
(goto-char (point-max)))
(slime-repl-show-maximum-output))
@@ -5464,8 +5472,10 @@
(defun slime-insert-transcript-delimiter (string)
(with-current-buffer (slime-output-buffer)
- (slime-with-output-end-mark
- (unless (bolp) (insert-before-markers "\n"))
+ (goto-char (point-max))
+ (unless (bolp) (insert-before-markers "\n"))
+ (slime-mark-output-start)
+ (slime-mark-input-start)
(slime-propertize-region '(slime-transcript-delimiter t)
(insert-before-markers
";;;; " (subst-char-in-string ?\n ?\
@@ -9286,15 +9296,18 @@
(def-slime-test interactive-eval-output
(input result-contents visiblep)
"Test simple commands in the minibuffer."
- '(("(+ 1 2)" ";;;; (+ 1 2) ...
-SWANK> " nil)
- ("(princ 10)" ";;;; (princ 10) ...
+ '(("(+ 1 2)" "SWANK>
+;;;; (+ 1 2) ...
+" nil)
+ ("(princ 10)" "SWANK>
+;;;; (princ 10) ...
10
-SWANK> " t)
+" t)
("(princ \"ßäëïöüáéíóúàèìòùâêîôûãõøçðåæ\")"
- ";;;; (princ \"ßäëïöüáéíóúàèìòùâêîôûãõøçðåæ\") ...
+ "SWANK>
+;;;; (princ \"ßäëïöüáéíóúàèìòùâêîôûãõøçðåæ\") ...
ßäëïöüáéíóúàèìòùâêîôûãõøçðåæ
-SWANK> " t))
+" t))
(when (and (fboundp 'string-to-multibyte)
(with-current-buffer (process-buffer (slime-connection))
enable-multibyte-characters))
More information about the slime-cvs
mailing list