[slime-cvs] CVS slime

mkoeppe mkoeppe at common-lisp.net
Sun Aug 26 06:11:57 UTC 2007


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

Modified Files:
	slime.el 
Log Message:
(slime-insert-presentation): Make the
rectangle-ification of multi-line presentations, introduced
2006-12-19, optional.
(slime-write-string): Use it here only for regular output, but not
for REPL results.
(sldb-insert-locals): Use it here.
(slime-inspector-insert-ispec): Use it here.


--- /project/slime/cvsroot/slime/slime.el	2007/08/26 05:28:01	1.817
+++ /project/slime/cvsroot/slime/slime.el	2007/08/26 06:11:56	1.818
@@ -3046,13 +3046,20 @@
   (slime-with-rigid-indentation nil
     (apply #'insert strings)))
 
-(defun slime-insert-presentation (string output-id)
-  (cond ((not slime-repl-enable-presentations)
-         (slime-insert-possibly-as-rectangle string))
-        (t
-         (let ((start (point)))
-           (slime-insert-possibly-as-rectangle string)
-           (slime-add-presentation-properties start (point) output-id t)))))
+(defun slime-insert-presentation (string output-id &optional rectangle)
+  "Insert STRING in current buffer and mark it as a presentation 
+corresponding to OUTPUT-ID.  If RECTANGLE is true, indent multi-line
+strings to line up below the current point."
+  (flet ((insert-it ()
+                    (if rectangle 
+                        (slime-insert-possibly-as-rectangle string)
+                      (insert string))))
+    (cond ((not slime-repl-enable-presentations)
+           (insert-it))
+          (t
+           (let ((start (point)))
+             (insert-it)
+             (slime-add-presentation-properties start (point) output-id t))))))
 
 (defun slime-open-stream-to-lisp (port)
   (let ((stream (open-network-stream "*lisp-output-stream*" 
@@ -3142,7 +3149,7 @@
      (with-current-buffer (slime-output-buffer)
        (slime-with-output-end-mark
         (if id
-            (slime-insert-presentation string id)
+            (slime-insert-presentation string id t)
           (slime-propertize-region '(face slime-repl-output-face
                                           rear-nonsticky (face))
             (insert string)))
@@ -8196,7 +8203,7 @@
                     " = ")
             (slime-insert-presentation
              (in-sldb-face local-value value)
-             `(:frame-var ,slime-current-thread ,(car frame) ,i))
+             `(:frame-var ,slime-current-thread ,(car frame) ,i) t)
             (insert "\n")))))
 
 (defun sldb-hide-frame-details ()
@@ -8750,7 +8757,7 @@
            (list 'slime-part-number id 
                  'mouse-face 'highlight
                  'face 'slime-inspector-value-face)
-         (slime-insert-presentation string `(:inspected-part ,id))))
+         (slime-insert-presentation string `(:inspected-part ,id) t)))
       ((:action string id)
        (slime-insert-propertized (list 'slime-action-number id
                                        'mouse-face 'highlight




More information about the slime-cvs mailing list