]> gitweb.factorcode.org Git - factor.git/commitdiff
fix prettyprinter bug
authorSlava Pestov <slava@factorcode.org>
Thu, 10 Feb 2005 22:36:19 +0000 (22:36 +0000)
committerSlava Pestov <slava@factorcode.org>
Thu, 10 Feb 2005 22:36:19 +0000 (22:36 +0000)
TODO.FACTOR.txt
factor/jedit/FactorShell.java
factor/jedit/WordPreview.java
library/syntax/prettyprint.factor

index 0ebe2d393af2f40deceb5505d780280420817901..1c8bd032579158b0abfd7398ba3c3b7fdcbe85cd 100644 (file)
@@ -1,7 +1,5 @@
 72/73:\r
 \r
-- keep a list of getter/setter words\r
-- default constructor\r
 - move tuple to generic vocab\r
 - update plugin docs\r
 - extract word keeps indent\r
index b1f8d6306c9e6b0aaa68f70d8647627cf1692329..7eaaea3a1c7ec581289520d3902ccc9080f7e41d 100644 (file)
@@ -203,7 +203,11 @@ public class FactorShell extends Shell
                        output.print(console.getInfoColor(),
                                jEdit.getProperty("factor.shell.opening"));
 
-                       stream = FactorPlugin.getExternalInstance().openStream();
+                       stream = null;
+                       ExternalFactor external = FactorPlugin.getExternalInstance();
+                       if(external != null)
+                               stream = external.openStream();
+
                        if(stream == null)
                        {
                                output.print(console.getInfoColor(),
index 6e3328461799550c6a4cd3d7151677269d8b2a12..53ecca3e5f1f0bce7e18288207a60bfe9cbcd6a8 100644 (file)
@@ -134,6 +134,9 @@ public class WordPreview implements ActionListener, CaretListener
                if(SideKickPlugin.isParsingBuffer(view.getBuffer()))
                        return;
 
+               if(!view.getBuffer().isLoaded())
+                       return;
+
                FactorParsedData data = FactorPlugin.getParsedData(view);
                if(data != null)
                {
index dacf88bb18d84a4c8f34df7940872b9a7c65a550..8c6a069d9d335800f1ef0b5e9a6c314f6a3536d7 100644 (file)
@@ -108,8 +108,12 @@ M: word prettyprint* ( indent word -- indent )
 
 M: list prettyprint* ( indent list -- indent )
     [
-        \ [ swap \ ] prettyprint-sequence
-    ] check-recursion ;
+        [
+            \ [ swap \ ] prettyprint-sequence
+        ] check-recursion
+    ] [
+        f unparse write
+    ] ifte* ;
 
 M: cons prettyprint* ( indent cons -- indent )
     #! Here we turn the cons into a list of two elements.