[slime-cvs] CVS slime/contrib

CVS User trittweiler trittweiler at common-lisp.net
Sat May 16 13:12:04 UTC 2009


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

Modified Files:
	ChangeLog slime-fontifying-fu.el 
Log Message:
	* slime-fontifying-fu.el (slime-beginning-of-tlf): Make sure to
	skip outside of comments and strings first.


--- /project/slime/cvsroot/slime/contrib/ChangeLog	2009/05/16 12:54:33	1.210
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2009/05/16 13:12:03	1.211
@@ -1,5 +1,10 @@
 2009-05-16  Tobias C. Rittweiler  <tcr at freebits.de>
 
+	* slime-fontifying-fu.el (slime-beginning-of-tlf): Make sure to
+	skip outside of comments and strings first.
+
+2009-05-16  Tobias C. Rittweiler  <tcr at freebits.de>
+
 	Optimize font-lock-magic.
 
 	* slime-fontifying-fu.el (slime-search-suppressed-forms-match-data):
--- /project/slime/cvsroot/slime/contrib/slime-fontifying-fu.el	2009/05/16 12:54:33	1.4
+++ /project/slime/cvsroot/slime/contrib/slime-fontifying-fu.el	2009/05/16 13:12:04	1.5
@@ -140,13 +140,17 @@
 
 (defun slime-beginning-of-tlf ()
   (let* ((state (slime-current-parser-state))
-         (depth (nth 0 state)))
-    (if (plusp depth)
-        (up-list (- depth))
-        (when-let (upper-pt (nth 1 state)) 
-          (goto-char upper-pt)
-          (while (when-let (upper-pt (nth 1 (slime-current-parser-state)))
-                   (goto-char upper-pt)))))))
+         (comment-start (nth 8 state)))
+    (when comment-start                 ; or string
+      (goto-char comment-start)
+      (setq state (slime-current-parser-state)))
+    (let ((depth (nth 0 state)))
+      (if (plusp depth)
+          (up-list (- depth))
+          (when-let (upper-pt (nth 1 state)) 
+            (goto-char upper-pt)
+            (while (when-let (upper-pt (nth 1 (slime-current-parser-state)))
+                     (goto-char upper-pt))))))))
 
 (defun slime-compute-region-for-font-lock (orig-beg orig-end)
   (let ((beg orig-beg)





More information about the slime-cvs mailing list