[slime-cvs] CVS slime

CVS User trittweiler trittweiler at common-lisp.net
Tue Feb 24 17:43:15 UTC 2009


Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv12476

Modified Files:
	ChangeLog slime.el 
Log Message:
	* slime.el (slime-forward-cruft): Forward whitespace, reader
	conditonals, comments. Splitted from `slime-forward-sexp'.
	(slime-pretty-package-name): Use it.


--- /project/slime/cvsroot/slime/ChangeLog	2009/02/24 17:24:07	1.1685
+++ /project/slime/cvsroot/slime/ChangeLog	2009/02/24 17:43:15	1.1686
@@ -1,5 +1,11 @@
 2009-02-24  Tobias C. Rittweiler  <tcr at freebits.de>
 
+	* slime.el (slime-forward-cruft): Forward whitespace, reader
+	conditonals, comments. Splitted from `slime-forward-sexp'.
+	(slime-pretty-package-name): Use it.
+
+2009-02-24  Tobias C. Rittweiler  <tcr at freebits.de>
+
 	Re-checkin my change from 2009-02-14. It seems I didn't actually
 	commit it.
 
--- /project/slime/cvsroot/slime/slime.el	2009/02/24 17:24:07	1.1126
+++ /project/slime/cvsroot/slime/slime.el	2009/02/24 17:43:15	1.1127
@@ -407,12 +407,11 @@
                      (with-temp-buffer
                        (insert name)
                        (goto-char (point-min))
-                       (slime-forward-sexp) ; skip reader conditionals
-                       (let ((old (point)))
-                         (backward-sexp)
-                         (buffer-substring-no-properties (point) old))))
-                    (t
-                     (error "FALL THROUGH")))))
+                       (slime-forward-cruft)
+                       (if (eobp)       ; Skipped all reader conditionals?
+                           name         ; If so, do nothing.
+                           (slime-pretty-package-name (slime-sexp-at-point)))))
+                    (t (error "FALL THROUGH")))))
     (format "%s" name)))
 
 (defun slime-compute-modeline-connection ()
@@ -7983,11 +7982,15 @@
   "Like `forward-sexp', but understands reader-conditionals (#- and #+),
 and skips comments."
   (dotimes (i (or count 1))
-    (while (slime-point-moves-p (slime-forward-blanks)
-                                (slime-forward-any-comment)
-                                (slime-forward-reader-conditional)))
+    (slime-forward-cruft)
     (forward-sexp)))
 
+(defun slime-forward-cruft ()
+  "Move forward over whitespace, comments, reader conditionals."
+  (while (slime-point-moves-p (slime-forward-blanks)
+                              (slime-forward-any-comment)
+                              (slime-forward-reader-conditional))))
+
 (defun slime-forward-blanks ()
   "Move forward over all whitespace and newlines at point."
   (ignore-errors





More information about the slime-cvs mailing list