[slime-cvs] CVS slime/contrib

CVS User trittweiler trittweiler at common-lisp.net
Sun Jun 14 16:47:34 UTC 2009


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

Modified Files:
	slime-fontifying-fu.el ChangeLog 
Log Message:
	* slime-fontifying-fu.el (slime-search-suppressed-form): Retry the
	search differently; handlers are not active anymore inside a
	handler in `condition-case'.


--- /project/slime/cvsroot/slime/contrib/slime-fontifying-fu.el	2009/06/11 12:30:07	1.10
+++ /project/slime/cvsroot/slime/contrib/slime-fontifying-fu.el	2009/06/14 16:47:34	1.11
@@ -64,27 +64,31 @@
   "Find reader conditionalized forms where the test is false."
   (when (and slime-highlight-suppressed-forms
              (slime-connected-p))
-    (condition-case condition
-        (slime-search-suppressed-forms-internal limit)
-      (end-of-file                      ; e.g. #+(
-       nil) 
-      ;; We found a reader conditional we couldn't process for some
-      ;; reason; however, there may still be other reader conditionals
-      ;; before `limit'.
-      (invalid-read-syntax              ; e.g. #+#.foo
-       (slime-search-suppressed-forms-internal limit))
-      (scan-error                       ; e.g. #| #+(or) #|
-       (slime-search-suppressed-forms-internal limit)) 
-      (slime-unknown-feature-expression ; e.g. #+(foo)
-       (slime-search-suppressed-forms-internal limit)) 
-      (error
-       ;; If this reports `(cl-assertion-failed (<= (point) limit))',
-       ;; the actual culprit is `slime-extend-region-for-font-lock'
-       ;; which did not extend the region enough in this case.
-       (slime-bug 
-        (concat "Caught error during fontification while searching for forms\n"
-                "that are suppressed by reader-conditionals. The error was: %S.")
-        condition)))))
+    (let ((result 'retry))
+      (while (eq result 'retry)
+        (condition-case condition
+            (setq result (slime-search-suppressed-forms-internal limit))
+          (end-of-file                      ; e.g. #+(
+           (setq result nil)) 
+          ;; We found a reader conditional we couldn't process for
+          ;; some reason; however, there may still be other reader
+          ;; conditionals before `limit'.
+          (invalid-read-syntax              ; e.g. #+#.foo
+           (setq result 'retry))
+          (scan-error                       ; e.g. #| #+(or) #|
+           (setq result 'retry)) 
+          (slime-unknown-feature-expression ; e.g. #+(foo)
+           (setq result 'retry)) 
+          (error
+           (setq result nil)
+           ;; If this reports `(cl-assertion-failed (<= (point) limit))',
+           ;; the actual culprit is `slime-extend-region-for-font-lock'
+           ;; which did not extend the region enough in this case.
+           (slime-bug 
+            (concat "Caught error during fontification while searching for forms\n"
+                    "that are suppressed by reader-conditionals. The error was: %S.")
+            condition))))
+      result)))
 
 
 (defun slime-search-directly-preceding-reader-conditional ()
--- /project/slime/cvsroot/slime/contrib/ChangeLog	2009/06/11 08:14:58	1.216
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2009/06/14 16:47:34	1.217
@@ -1,4 +1,10 @@
-2009-05-28  Tobias C. Rittweiler  <tcr at freebits.de>
+2009-06-14  Tobias C. Rittweiler  <tcr at freebits.de>
+
+	* slime-fontifying-fu.el (slime-search-suppressed-form): Retry the
+	search differently; handlers are not active anymore inside a
+	handler in `condition-case'.
+
+2009-06-12  Tobias C. Rittweiler  <tcr at freebits.de>
 
 	* slime-fontifying-fu.el (slime-compute-region-for-font-lock): Fix
 	for `#+foo (... #+bar (... |) ...)'.





More information about the slime-cvs mailing list