mes: display: Display escaped characters.
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 22 Apr 2018 18:08:38 +0000 (20:08 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 22 Apr 2018 18:08:38 +0000 (20:08 +0200)
* module/mes/display.mes (display): Display escaped characters.

module/mes/display.mes

index 65c9b0ecb852ca7e1aaae2e5bcb1c4f197a5533e..9c1e099fd4de685150a7e9cde1f42883096d8d8d 100644 (file)
       (cond ((and write? (or (eq? x #\") (eq? x #\\)))
              (write-char #\\ port)
              (write-char x port))
+            ((and write? (eq? x #\nul))
+             (write-char #\\ port)
+             (write-char #\0 port))
+            ((and write? (eq? x #\alarm))
+             (write-char #\\ port)
+             (write-char #\a port))
+            ((and write? (eq? x #\backspace))
+             (write-char #\\ port)
+             (write-char #\b port))
+            ((and write? (eq? x #\tab))
+             (write-char #\\ port)
+             (write-char #\t port))
             ((and write? (eq? x #\newline))
              (write-char #\\ port)
              (write-char #\n port))
+            ((and write? (eq? x #\vtab))
+             (write-char #\\ port)
+             (write-char #\v port))
+            ((and write? (eq? x #\page))
+             (write-char #\\ port)
+             (write-char #\f port))
             (#t (write-char x port))))
 
     (define (d x cont? sep)