diff --git a/module/language/elisp/compile-tree-il.scm b/module/language/elisp/compile-tree-il.scm index ba81584e8..2af795870 100644 --- a/module/language/elisp/compile-tree-il.scm +++ b/module/language/elisp/compile-tree-il.scm @@ -49,7 +49,7 @@ compile-function compile-defmacro compile-defun - compile-\` + #{compile-`}# compile-quote)) ;;; Certain common parameters (like the bindings data structure or @@ -101,10 +101,10 @@ ;;; unquote/unquote-splicing/backquote form. (define (unquote? sym) - (and (symbol? sym) (eq? sym '\,))) + (and (symbol? sym) (eq? sym '#{,}#))) (define (unquote-splicing? sym) - (and (symbol? sym) (eq? sym '\,@))) + (and (symbol? sym) (eq? sym '#{,@}#))) ;;; Build a call to a primitive procedure nicely. @@ -876,7 +876,7 @@ body)) (make-const loc name))))))) -(defspecial \` (loc args) +(defspecial #{`}# (loc args) (pmatch args ((,val) (process-backquote loc val)))) diff --git a/module/language/elisp/parser.scm b/module/language/elisp/parser.scm index 2bc41a044..d420136d0 100644 --- a/module/language/elisp/parser.scm +++ b/module/language/elisp/parser.scm @@ -164,9 +164,9 @@ ;;; routine in our recursive-descent parser. (define quotation-symbols '((quote . quote) - (backquote . \`) - (unquote . \,) - (unquote-splicing . \,@))) + (backquote . #{`}#) + (unquote . #{,}#) + (unquote-splicing . #{,@}#))) (define (get-expression lex) (let* ((token (lex 'get)) diff --git a/module/language/elisp/runtime/function-slot.scm b/module/language/elisp/runtime/function-slot.scm index 13e5de957..da537693d 100644 --- a/module/language/elisp/runtime/function-slot.scm +++ b/module/language/elisp/runtime/function-slot.scm @@ -56,7 +56,7 @@ (compile-function . function) (compile-defun . defun) (compile-defmacro . defmacro) - (compile-\` . \`) + (#{compile-`}# . #{`}#) (compile-quote . quote))) #:duplicates (last) ;; special operators @@ -79,7 +79,7 @@ function defun defmacro - \` + #{`}# quote) ;; macros #:re-export (lambda diff --git a/test-suite/tests/elisp-compiler.test b/test-suite/tests/elisp-compiler.test index 61b6f5f1d..df22afe1c 100644 --- a/test-suite/tests/elisp-compiler.test +++ b/test-suite/tests/elisp-compiler.test @@ -204,7 +204,7 @@ (progn (setq depth 10 i depth) (setq code '(eval 0)) (while (not (zerop i)) - (setq code (\` (eval (quote (1+ (\, code)))))) + (setq code (#{`}# (eval (quote (1+ (#{,}# code)))))) (setq i (1- i))) (= (eval code) depth)))) @@ -527,19 +527,19 @@ (equal '(1 2 . 3) '(1 2 . 3)))) (pass-if "simple backquote" - (and (equal (\` 42) 42) - (equal (\` (1 (a))) '(1 (a))) - (equal (\` (1 . 2)) '(1 . 2)))) + (and (equal (#{`}# 42) 42) + (equal (#{`}# (1 (a))) '(1 (a))) + (equal (#{`}# (1 . 2)) '(1 . 2)))) (pass-if "unquote" (progn (setq a 42 l '(18 12)) - (and (equal (\` (\, a)) 42) - (equal (\` (1 a ((\, l)) . (\, a))) '(1 a ((18 12)) . 42))))) + (and (equal (#{`}# (#{,}# a)) 42) + (equal (#{`}# (1 a ((#{,}# l)) . (#{,}# a))) '(1 a ((18 12)) . 42))))) (pass-if "unquote splicing" (progn (setq l '(18 12) empty '()) - (and (equal (\` (\,@ l)) '(18 12)) - (equal (\` (l 2 (3 (\,@ l)) ((\,@ l)) (\,@ l))) + (and (equal (#{`}# (#{,@}# l)) '(18 12)) + (equal (#{`}# (l 2 (3 (#{,@}# l)) ((#{,@}# l)) (#{,@}# l))) '(l 2 (3 18 12) (18 12) 18 12)) - (equal (\` (1 2 (\,@ empty) 3)) '(1 2 3)))))) + (equal (#{`}# (1 2 (#{,@}# empty) 3)) '(1 2 3)))))) diff --git a/test-suite/tests/elisp-reader.test b/test-suite/tests/elisp-reader.test index 9832903bb..cf7c15c52 100644 --- a/test-suite/tests/elisp-reader.test +++ b/test-suite/tests/elisp-reader.test @@ -163,7 +163,7 @@ test\"ab\"\\ abcd (and (equal? (parse-str "'(1 2 3 '4)") '(quote (1 2 3 (quote 4)))) (equal? (parse-str "`(1 2 ,3 ,@a)") - '(\` (1 2 (\, 3) (\,@ a)))))) + '(#{`}# (1 2 (#{,}# 3) (#{,@}# a)))))) (pass-if "lists" (equal? (parse-str "(1 2 (3) () 4 (. 5) (1 2 . (3 4)) (1 . 2) . 42)")