wisp
 
(Arne Babenhauserheide)
2015-10-12: unescape up to 6 leading underscores (fix bug 31).

unescape up to 6 leading underscores (fix bug 31).

diff --git a/.bugs/bugs b/.bugs/bugs
--- a/.bugs/bugs
+++ b/.bugs/bugs
@@ -9,7 +9,7 @@ an empty line with : should start with d
 wisp-in-wisp: remove the leading . for continuation lines after inferring the brackets. | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:2e42e5b64622f0cc383eb8acc3d510912e925bf0, time:1377476687.79
 interpret ` , : correctly.                                   | owner:, open:True, id:2feb5f048b55274c1bc7c8168c8cb358c0c8dd1d, time:1426777900.6
 '() gives REPR-QUOTE-...                                     | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:30c42de75c137f483245898e2a62af1e65cf19a6, time:1415060388.34
-multiple escaped initial underscores must be unescaped.      | owner:, open:True, id:314e45488da4c7c8298c4c64ece03359918d057b, time:1415959749.14
+multiple escaped initial underscores must be unescaped.      | owner:, open:False, id:314e45488da4c7c8298c4c64ece03359918d057b, time:1415959749.14
 wisp: handle general paren prefixes like quote, quasiquote, etc. | owner:, open:False, id:323ff94b5be635742619467e1cb44f4c0d96f63f, time:1379047798.47
 throw an exception when reducing indentation to an unknown indentation level. | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:424186bd85f186b7279c5c59e2bd42f847284719, time:1376003568.91
 LANG=C breaks bootstrap: python encoding error: it uses ascii. | owner:, open:True, id:43c7461bfb6f35a90ff3f4497c8232e2457ce1c7, time:1427819877.7
diff --git a/wisp-scheme.w b/wisp-scheme.w
--- a/wisp-scheme.w
+++ b/wisp-scheme.w
@@ -7,15 +7,8 @@ exec guile -L . --language=wisp -s "$0" 
 ;; scheme code tree to feed to a scheme interpreter instead of a
 ;; preprocessed file.
 
-;; Plan:
-;; read reads the first expression from a string. It ignores comments,
-;; so we have to treat these specially. Our wisp-reader only needs to
-;; worry about whitespace.
-;; 
-;; So we can skip all the string and bracket linebreak escaping and
-;; directly create a list of codelines with indentation. For this we
-;; then simply reuse the appropriate function from the generic wisp
-;; preprocessor.
+;; Limitations:
+;; - only unescapes up to 6 leading underscores at line start (\______)
 
 ;; Copyright (C) Arne Babenhauserheide (2014--2015). All Rights Reserved.
 
@@ -613,6 +606,16 @@ define : wisp-unescape-underscore-and-co
                map wisp-unescape-underscore-and-colon a
              '\_
                . '_
+             '\__
+               . '__
+             '\___
+               . '___
+             '\____
+               . '____
+             '\_____
+               . '_____
+             '\______
+               . '______
              '\:
                . ':
              a