[slime-cvs] CVS slime

trittweiler trittweiler at common-lisp.net
Wed Jul 16 19:18:51 UTC 2008


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

Modified Files:
	slime.el ChangeLog 
Log Message:

* slime.el (slime-xref-dspec-at-point): Make more robust.
  (slime-xref-insert-recompilation-flags): Ditto.
  (slime-column-max): New.


--- /project/slime/cvsroot/slime/slime.el	2008/07/16 16:14:50	1.945
+++ /project/slime/cvsroot/slime/slime.el	2008/07/16 19:18:51	1.946
@@ -6088,7 +6088,10 @@
 (defun slime-xref-dspec-at-point ()
   (save-excursion
     (beginning-of-line 1)
-    (slime-trim-whitespace (substring-no-properties (thing-at-point 'line)))))
+    (with-syntax-table lisp-mode-syntax-table
+      (forward-sexp)
+      (backward-sexp)
+      (slime-sexp-at-point))))
 
 (defun slime-all-xrefs ()
   (let ((xrefs nil))
@@ -6180,13 +6183,15 @@
 
 (defun slime-xref-insert-recompilation-flags (dspecs compilation-results)
   (let* ((buffer-read-only nil)
-         (max-dspec-length (reduce #'max dspecs :key #'length :initial-value 0))
-         (max-column (+ max-dspec-length 2))) ; 2 initial spaces
+         (max-column (slime-column-max)))
     (beginning-of-buffer)
     (loop for dspec in dspecs
           for result in compilation-results
           do (save-excursion
-               (search-forward dspec)
+               (loop for dspec-at-point = (progn (search-forward dspec)
+                                                 (slime-xref-dspec-at-point))
+                     until (equal dspec-at-point dspec))
+               (end-of-line) ; skip old status information.
                (dotimes (i (- max-column (current-column)))
                  (insert " "))
                (insert " ")
@@ -9218,6 +9223,13 @@
           (total (buffer-size)))
       (or (/= beg 1) (/= end (1+ total))))))
 
+(defun slime-column-max ()
+  (save-excursion
+    (beginning-of-buffer)
+    (loop for column = (prog2 (end-of-line) (current-column) (forward-line))
+          until (= (point) (point-max))
+          maximizing column)))
+
 ;;;;; CL symbols vs. Elisp symbols.
 
 (defun slime-cl-symbol-name (symbol)
--- /project/slime/cvsroot/slime/ChangeLog	2008/07/16 16:14:50	1.1368
+++ /project/slime/cvsroot/slime/ChangeLog	2008/07/16 19:18:51	1.1369
@@ -1,5 +1,11 @@
 2008-07-16  Tobias C. Rittweiler  <tcr at freebits.de>
 
+	* slime.el (slime-xref-dspec-at-point): Make more robust.
+	(slime-xref-insert-recompilation-flags): Ditto.
+	(slime-column-max): New.
+
+2008-07-16  Tobias C. Rittweiler  <tcr at freebits.de>
+
 	Recompilation support added to xref buffers. You can now use
 	`C-c C-c' in an xref buffer to recompile the defun represented by
 	the xref at point. Similiarly, you can use `C-c C-k' to recompile




More information about the slime-cvs mailing list