From 94a613f688605eaa9c4fa0a5bc94efc1d47279cb Mon Sep 17 00:00:00 2001
From: Alfredo Beaumont <alfredo.beaumont@gmail.com>
Date: Tue, 8 Jul 2008 20:40:37 +0200
Subject: [PATCH 1/2] Small change: use a better idiom

---
 extra/ctags/ctags.factor | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/extra/ctags/ctags.factor b/extra/ctags/ctags.factor
index c8bf2272fb..23d9aeb90c 100644
--- a/extra/ctags/ctags.factor
+++ b/extra/ctags/ctags.factor
@@ -22,7 +22,7 @@ IN: ctags
   { } swap [ ctag suffix ] each ;
 
 : ctags-write ( seq path -- )
-  >r ctag-strings r> ascii set-file-lines ;
+  [ ctag-strings ] dip ascii set-file-lines ;
 
 : (ctags) ( -- seq )
   { } all-words [

From 3e43c69918aa1c1f6b93359a4593011532d90901 Mon Sep 17 00:00:00 2001
From: Alfredo Beaumont <alfredo.beaumont@gmail.com>
Date: Tue, 8 Jul 2008 21:57:37 +0200
Subject: [PATCH 2/2] Fix examples' code and make them unchecked since they
 have side effects

---
 extra/ctags/ctags-docs.factor | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/extra/ctags/ctags-docs.factor b/extra/ctags/ctags-docs.factor
index 9d98cae0b3..22d811ad3f 100644
--- a/extra/ctags/ctags-docs.factor
+++ b/extra/ctags/ctags-docs.factor
@@ -12,9 +12,9 @@ HELP: ctags ( path -- )
 { $values { "path" "a pathname string" } }
 { $description "Generates a index file in ctags format and stores in " { $snippet "path" } "." }
 { $examples
-  { $example
+  { $unchecked-example
     "USING: ctags ;"
-    "\"tags\" ctags-write"
+    "\"tags\" ctags"
     ""
   }
 } ;
@@ -24,7 +24,7 @@ HELP: ctags-write ( seq path -- )
           { "path" "a pathname string" } }
 { $description "Stores a " { $snippet "alist" } " in " { $snippet "path" } ". " { $snippet "alist" } " must be an association list with ctags format: key must be a valid word and value a sequence whose first element is a resource name and second element is a line number" }
 { $examples
-  { $example
+  { $unchecked-example
     "USING: kernel ctags ;"
     "{ { if  { \"resource:extra/unix/unix.factor\" 91 } } } \"tags\" ctags-write"
     ""
@@ -38,9 +38,9 @@ HELP: ctag-strings ( alist -- seq )
           { "seq" sequence } }
 { $description "Converts an " { $snippet "alist" } " with ctag format (a word as key and a sequence whose first element is a resource name and a second element is a line number as value) in a " { $snippet "seq" } " of ctag strings." }
 { $examples
-  { $example
-    "USING: kernel ctags ;"
-    "{ { if  { \"resource:extra/unix/unix.factor\" 91 } } } ctag-strings"
+  { $unchecked-example
+    "USING: kernel ctags prettyprint ;"
+    "{ { if  { \"resource:extra/unix/unix.factor\" 91 } } } ctag-strings ."
     "{ \"if\\t/path/to/factor/extra/unix/unix.factor\\t91\" }"
   }
 } ;
@@ -50,8 +50,8 @@ HELP: ctag ( seq -- str )
           { "str" string } }
 { $description "Outputs a string " { $snippet "str" } " in ctag format for sequence with two elements, first one must be a valid word and second one a sequence whose first element is a resource name and second element is a line number" }
 { $examples
-  { $example
-    "USING: kernel ctags ;"
+  { $unchecked-example
+    "USING: kernel ctags prettyprint ;"
     "{ if  { \"resource:extra/unix/unix.factor\" 91 } } ctag ."
     "\"if\\t/path/to/factor/extra/unix/unix.factor\\t91\""
   }