8 files changed, 36 insertions(+), 14 deletions(-)

M .hgsigs
M .hgtags
M NEWS
M examples/evaluate-r7rs-benchmark.w
M ob-wisp.el
M wisp-mode.el
M wisp-reader.w
M wisp-scheme.w
M .hgsigs +1 -0
@@ 40,3 40,4 @@ 451002f968e17db47f34dfa29e6ea12f951aaa6b
 b9d97830feb34647c5a098038a93af859396b9e7 0 iQIzBAABCAAdFiEE801qEjXQSQPNItXAE++NRSQDw+sFAlyWsnYACgkQE++NRSQDw+u3Gg//YvrUgxQtWrhSJ4DryFxdHr58q4pDPOA1EmKTO4j/aG8zrt43iDxM0wd7pwEt/g6uBnuGL735sVGp8E8DlxxL93lEUuJtHwmX7oO6KyZ2Yt2UX1RliaRBHHEIM/9rXNkb5f5ZTput6WUqnukG5mA8R2FGNg3Mz6f8nq34GqABC7scjBw20fzYThYhkgnP9gv2geN+pPCStGO7v3UKOe++fWnjnhsjPglnZqh5twd3I9OBvfG3kdZCmZVopB5QHmomMNnYox3vBICGxh/HF5Usp30GbcFq/5xDUMFJ4NEuhOAr5UjHwghUTmsSFabqyitryaeocLTGnYY4zNZq6c93e70Tg40sd5cyB+or70QbOnvDXYtDm4cvK+6sWNrWaeqZz80V+ilnKX5M0vr/MjGgMn4eQCvp83/SN/YKC7xjetjQaIT+bMeA6TZba9p2QSlshn6lSFrS6dRg8SfsiDKfQ8hPGf6hhLAQ3bthvaFa8dU0kebxQMFcIY4hKolOvVa09Ea5BTJr9f6xKhfnE1v/6q1C5Tm5SepwY62zoEVrkrAkzAeilxKpZf44a6DS2qGpnRpaJtUYBdqR8oWuILF/1SG8XKhGtKo1XKoehnn97RVYz2BatPpdFvuJcIcbijtL9XBsbjqW57W7b3zcjDnxsdlzHtOMSLfjuqkZyuAZMqY=
 37175810518b562b91ddac6a58f97b3369e2dcc4 0 iQIzBAABCAAdFiEE801qEjXQSQPNItXAE++NRSQDw+sFAlysM7MACgkQE++NRSQDw+ucRA//YT794fT3rs3oP9PY1Falu+CQg2FgM6Fqv3kg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ivjHoPFzoi6cCWr7/jxn6ZHRkaZLwaCyBcWP+GZfPkwjbj43hLrkHoNQN2dYAlXiK8=

          
M .hgtags +1 -0
@@ 47,3 47,4 @@ ca4e089b6d1f26aa3626490191438c9e26995701
 3a527b81edb429775eedada34d0466304a6ea43e v1.0.1
 92559bb0e31251b35837fde64c534e5bc3753911 v1.0.2
 ba80bf370de0fe4867fc6ace066fa54af65f73d0 v1.0.3
+0ab387918c68c420fad357c7d1c504881adcd696 wisp-mode-0.2.7

          
M NEWS +3 -0
@@ 1,3 1,6 @@ 
+wisp 1.0.4
+- add one more setlocale fallback: If it cannot use unicode, wisp now proceeds with degraded operation rather than failing outright.
+
 wisp 1.0.3
 - provide wisp script that wraps guile --language=wisp -x .w
 - add Guile 3.0 to supported versions

          
M examples/evaluate-r7rs-benchmark.w +4 -1
@@ 103,6 103,10 @@ when : null? : cdr args
 define csv-file
     car : cdr args
 
+define : remove-options args
+    . "remove all options (starting with -) from the argument list. This ignores --."
+    remove : λ(x) : string-prefix? "-" x
+
 define project-prefix
     if : null? : cdr : cdr args
        . "guile"

          
@@ 116,7 120,6 @@ define : main args
       : port : open-input-file csv-file
         data-by-project : read-csv port
         data-min-by-test : min-alist-by-test data-by-project
-        guile-data : select-project-data data-by-project project-prefix
       when : member "--csv" args
           ; display "test slowdown\n"
           map : λ (x) : apply format #t "~a ~a\n" : list (car x) (cdr x)            

          
M ob-wisp.el +7 -7
@@ 48,7 48,7 @@ 
 
 (defvar org-babel-default-header-args:wisp '())
 
-(defcustom org-babel-wisp-command "guile -L $HOME/wisp --language=wisp -x .w -e '(lambda (args) (set! (@@ (system repl common) repl-welcome) (const #f)))' -c ''"
+(defcustom org-babel-wisp-command "wisp -e '(lambda (args) (set! (@@ (system repl common) repl-welcome) (const #f)))'"
   ;; setting repl-welcome to #f gets rid of printing the REPL prefix and Guile version
   "Name of the command for executing Wisp code."
   :version "24.4"

          
@@ 237,14 237,14 @@ then create.  Return the initialized ses
 define : main
 %s
 
-write (main) : open-output-file '%s' .")
+write (main) : open-output-file '%s'")
 (defvar org-babel-wisp-pp-wrapper-method
   "
 import : ice-9 pretty-print
 define : main
 %s
 
-pretty-print (main) : open-output-file '%s' .")
+pretty-print (main) : open-output-file '%s'")
 
 (defun org-babel-wisp-evaluate
   (session body &optional result-type result-params preamble)

          
@@ 276,7 276,7 @@ last statement in BODY, as elisp."
                            org-babel-wisp-pp-wrapper-method
                          org-babel-wisp-wrapper-method)
                        (mapconcat
-                        (lambda (line) (format "\t%s" line))
+                        (lambda (line) (format "    %s" line))
                         (split-string
                          (org-remove-indentation
                           (org-trim body))

          
@@ 301,10 301,10 @@ last statement in BODY, as elisp."
 	     (lambda (statement) (insert statement) (funcall send-wait))
 	     (if pp
 		 (list
-		  "import : ice-9 pretty-print ."
-		  (format "pretty-print (main) : open-output-file '%s' ."
+		  "import : ice-9 pretty-print"
+		  (format "pretty-print (main) : open-output-file '%s'"
 			  (org-babel-process-file-name tmp-file 'noquote)))
-	       (list (format "write (main) : open-output-file '%s' ."
+	       (list (format "write (main) : open-output-file '%s'"
 			     (org-babel-process-file-name tmp-file
                                                           'noquote)))))))
 	 (input-body (lambda (body)

          
M wisp-mode.el +7 -4
@@ 5,8 5,10 @@ 
 ;;               from https://github.com/kwrooijen/indy/blob/master/indy.el
 
 ;; Author: Arne Babenhauserheide <arne_bab@web.de>
-;; Version: 0.2.6
-;; Keywords: languages, lisp
+;; Version: 0.2.7
+;; Keywords: languages, lisp, scheme
+;; Homepage: http://www.draketo.de/english/wisp
+;; Package-Requires: ((emacs "24.4"))
 
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License

          
@@ 40,6 42,7 @@ 
 ;; 
 ;; ChangeLog:
 ;;
+;;  - 0.2.7: dependency declared, always use wisp--prefix, homepage url
 ;;  - 0.2.6: remove unnecessary autoloads
 ;;  - 0.2.5: backtab chooses existing lower indentation values from previous lines.
 ;;  - 0.2.4: better indentation support:

          
@@ 150,7 153,7 @@ 
     (back-to-indentation)
     (current-column)))
 
-(defun indy--fix-num (num)
+(defun wisp--fix-num (num)
   "Make sure NUM is a valid number for calculating indentation."
   (cond
    ((not num) 0)

          
@@ 165,7 168,7 @@ 
       (let ((num (max num 0)))
         (indent-line-to num))
       (unless (<= currcol currind)
-        (move-to-column (indy--fix-num (+ num (- currcol currind))))))))
+        (move-to-column (wisp--fix-num (+ num (- currcol currind))))))))
 
 (defun wisp--tab ()
   "Cycle through indentations depending on the previous line.

          
M wisp-reader.w +12 -2
@@ 18,7 18,7 @@ define-module : language wisp spec
 ; Set locale to something which supports unicode. Required to avoid using fluids.
 catch #t
       lambda :
-        setlocale LC_ALL "foo"
+        setlocale LC_ALL ""
       lambda : key . parameters
         let : : locale-fallback "en_US.UTF-8"
           format (current-error-port)

          
@@ 28,7 28,17 @@ catch #t
                      . "If this fails, you might need glibc support for unicode locales.\n"
                   .  "\n;;;          "
               . key parameters locale-fallback
-          setlocale LC_ALL locale-fallback
+          catch #t
+            lambda :
+              setlocale LC_ALL locale-fallback
+            lambda : key . parameters
+              format (current-error-port)
+                  string-join
+                      list ";;; Warning: fallback setlocale LC_ALL ~A failed with ~A: ~A"
+                         . "Not switching to Unicode."
+                         . "You might need glibc support for unicode locales.\n"
+                      .  "\n;;;          "
+                  . locale-fallback key parameters
 
 ;;;
 ;;; Language definition

          
M wisp-scheme.w +1 -0
@@ 49,6 49,7 @@ use-modules
   ice-9 rw ; for write-string/partial
   ice-9 match
 
+
 ;; Helper functions for the indent-and-symbols data structure: '((indent token token ...) ...)
 define : line-indent line
          car line