]> gitweb.factorcode.org Git - factor.git/commitdiff
help: make sure error-classes are displayed in error index.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sat, 6 Apr 2013 20:35:37 +0000 (13:35 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sat, 6 Apr 2013 20:35:37 +0000 (13:35 -0700)
basis/help/help.factor

index 8741b50ff65c22f4911fe8230572e688081d550b..60cba2fc881508afc6cc19a7623a7aab9b1281e8 100644 (file)
@@ -1,11 +1,10 @@
 ! Copyright (C) 2005, 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays io io.styles kernel namespaces make
-parser prettyprint sequences words words.symbol assocs
-definitions generic quotations effects slots continuations
-classes.tuple debugger combinators vocabs help.stylesheet
-help.topics help.crossref help.markup sorting classes
-vocabs.loader ;
+USING: accessors arrays assocs classes classes.tuple
+combinators combinators.short-circuit continuations debugger
+effects generic help.crossref help.markup help.stylesheet
+help.topics io io.styles kernel make namespaces prettyprint
+sequences sorting vocabs words words.symbol ;
 IN: help
 
 GENERIC: word-help* ( word -- content )
@@ -40,7 +39,10 @@ M: predicate word-help* drop \ $predicate ;
     all-articles [ xref-article ] each ;
 
 : error? ( word -- ? )
-    \ $error-description swap word-help elements empty? not ;
+    {
+        [ error-class? ]
+        [ \ $error-description swap word-help elements empty? not ]
+    } 1|| ;
 
 : sort-articles ( seq -- newseq )
     [ dup article-title ] { } map>assoc sort-values keys ;