[slime-cvs] CVS slime

heller heller at common-lisp.net
Sat Feb 9 18:42:40 UTC 2008


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv20847

Modified Files:
	ChangeLog slime.el 
Log Message:
Make slime-property-bounds more useful.

* slime.el (slime-property-bounds): Remove special casing for
whitespace at the end.
(slime-repl-send-input): Don't mark the newline with the
slime-repl-old-input property.
(sldb-frame-region): Use slime-property-bounds.


--- /project/slime/cvsroot/slime/ChangeLog	2008/02/09 18:38:58	1.1284
+++ /project/slime/cvsroot/slime/ChangeLog	2008/02/09 18:42:34	1.1285
@@ -1,5 +1,15 @@
 2008-02-09  Helmut Eller  <heller at common-lisp.net>
 
+	Make slime-property-bounds more useful.
+
+	* slime.el (slime-property-bounds): Remove special casing for
+	whitespace at the end.
+	(slime-repl-send-input): Don't mark the newline with the
+	slime-repl-old-input property.
+	(sldb-frame-region): Use slime-property-bounds.
+
+2008-02-09  Helmut Eller  <heller at common-lisp.net>
+
 	Inspector cleanups.
 
 	* swank.lisp (emacs-inspect): Renamed from inspect-for-emacs.
--- /project/slime/cvsroot/slime/slime.el	2008/02/09 18:31:58	1.902
+++ /project/slime/cvsroot/slime/slime.el	2008/02/09 18:42:35	1.903
@@ -3172,14 +3172,14 @@
   (let ((end (point))) ; end of input, without the newline
     (slime-repl-add-to-input-history 
      (buffer-substring slime-repl-input-start-mark end))
-    (when newline 
-      (insert "\n")
-      (slime-repl-show-maximum-output))
     (let ((inhibit-read-only t))
       (add-text-properties slime-repl-input-start-mark 
                            (point)
                            `(slime-repl-old-input
                              ,(incf slime-repl-old-input-counter))))
+    (when newline 
+      (insert "\n")
+      (slime-repl-show-maximum-output))
     (let ((overlay (make-overlay slime-repl-input-start-mark end)))
       ;; These properties are on an overlay so that they won't be taken
       ;; by kill/yank.
@@ -3212,25 +3212,9 @@
 (defun slime-property-bounds (prop)
   "Return two the positions of the previous and next changes to PROP.
 PROP is the name of a text property."
-  (let* ((beg (save-excursion
-                ;; previous-single-char-property-change searches for a
-                ;; property change from the previous character, but we
-                ;; want to look for a change from the point. We step
-                ;; forward one char to avoid doing the wrong thing if
-                ;; we're at the beginning of the old input. -luke
-                ;; (18/Jun/2004)
-                (unless (not (get-text-property (point) prop)) 
-                  ;; alanr unless we are sitting right after it May 19, 2005
-                  (ignore-errors (forward-char)))
-                (previous-single-char-property-change (point) prop)))
-         (end (save-excursion
-                (if (get-text-property (point) prop)
-                    (progn (goto-char (next-single-char-property-change 
-                                       (point) prop))
-                           (skip-chars-backward "\n \t\r" beg)
-                           (point))
-                  (point)))))
-    (values beg end)))
+  (assert (get-text-property (point) prop))
+  (let ((end (next-single-char-property-change (point) prop)))
+    (list (previous-single-char-property-change end prop) end)))
 
 (defun slime-repl-closing-return ()
   "Evaluate the current input string after closing all open lists."
@@ -6816,11 +6800,7 @@
        (get-text-property (point) 'details-visible-p)))
 
 (defun sldb-frame-region ()
-  (save-excursion
-    (goto-char (next-single-property-change (point) 'frame nil (point-max)))
-    (backward-char)
-    (values (previous-single-property-change (point) 'frame)
-	    (next-single-property-change (point) 'frame nil (point-max)))))
+  (slime-property-bounds 'frame))
 
 (defun sldb-forward-frame ()
   (goto-char (next-single-char-property-change (point) 'frame)))




More information about the slime-cvs mailing list