[slime-cvs] CVS update: slime/slime.el

Luke Gorrie lgorrie at common-lisp.net
Wed Feb 2 03:08:31 UTC 2005


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv4120

Modified Files:
	slime.el 
Log Message:
(slime-repl-send-input): Move some properties of old REPL input (e.g.
read-only) from text properties into an overlay, so that kill/yank
will leave them behind. Left `slime-repl-old-input' as a text
properties because it's more convenient to lookup that way.

(slime-repl-return): Ignore `slime-repl-old-input' property if the
point is in front of the current REPL prompt, i.e. if the user has
copy&pasted some old REPL input into the current input area.

Date: Wed Feb  2 04:08:28 2005
Author: lgorrie

Index: slime/slime.el
diff -u slime/slime.el:1.454 slime/slime.el:1.455
--- slime/slime.el:1.454	Sun Jan 30 10:29:14 2005
+++ slime/slime.el	Wed Feb  2 04:08:23 2005
@@ -2740,7 +2740,8 @@
   (interactive "P")
   (slime-check-connected)
   (assert (<= (point) slime-repl-input-end-mark))
-  (cond ((get-text-property (point) 'slime-repl-old-input)
+  (cond ((and (get-text-property (point) 'slime-repl-old-input)
+              (< (point) slime-repl-input-start-mark))
          (slime-repl-grab-old-input end-of-input))
         (end-of-input
          (slime-repl-send-input))
@@ -2761,12 +2762,14 @@
   (goto-char slime-repl-input-end-mark)
   (when newline (insert "\n"))
   (add-text-properties slime-repl-input-start-mark (point)
-                       `(face slime-repl-input-face
-                              rear-nonsticky (face slime-repl-old-input)
-                              slime-repl-old-input 
-                              ,(incf slime-repl-old-input-counter)))
+                       `(slime-repl-old-input
+                         ,(incf slime-repl-old-input-counter)))
   (let ((overlay (make-overlay slime-repl-input-start-mark (point))))
-    (overlay-put overlay 'read-only t))
+    ;; These properties are on an overlay so that they won't be taken
+    ;; by kill/yank.
+    (overlay-put overlay 'read-only t)
+    (overlay-put overlay 'face 'slime-repl-input-face)
+    (overlay-put overlay 'rear-nonsticky '(face slime-repl-old-input-counter)))
   (let ((input (slime-repl-current-input)))
     (goto-char slime-repl-input-end-mark)
     (slime-mark-input-start)




More information about the slime-cvs mailing list