summaryrefslogtreecommitdiff
path: root/elisp/geiser-syntax.el
diff options
context:
space:
mode:
Diffstat (limited to 'elisp/geiser-syntax.el')
-rw-r--r--elisp/geiser-syntax.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index ae1c3dd..17e0999 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -122,6 +122,11 @@ implementation-specific entries for font-lock-keywords.")
(defsubst geiser-syntax--read/elisp ()
(ignore-errors (read (current-buffer))))
+(defun geiser-syntax--read/symbol ()
+ (with-syntax-table scheme-mode-syntax-table
+ (when (re-search-forward "\\(\\sw\\|\\s_\\)+" nil t)
+ (make-symbol (match-string 0)))))
+
(defun geiser-syntax--read/matching (open close)
(let ((count 1)
(p (1+ (point))))
@@ -160,7 +165,7 @@ implementation-specific entries for font-lock-keywords.")
(?\( (geiser-syntax--read/token 'vectorb))
(?\< (geiser-syntax--read/unprintable))
((?' ?` ?,) (geiser-syntax--read/next-token))
- (t (let ((tok (geiser-syntax--read/elisp)))
+ (t (let ((tok (geiser-syntax--read/symbol)))
(if tok (cons 'atom (intern (format "#%s" tok)))
(geiser-syntax--read/next-token))))))
(?\' (geiser-syntax--read/token '(quote . quote)))
@@ -171,7 +176,7 @@ implementation-specific entries for font-lock-keywords.")
`(splice . ,backquote-splice-symbol))
`(unquote . ,backquote-unquote-symbol)))
(?\" (cons 'string (geiser-syntax--read/elisp)))
- (t (cons 'atom (geiser-syntax--read/elisp))))))
+ (t (cons 'atom (geiser-syntax--read/symbol))))))
(defsubst geiser-syntax--read/match (&rest tks)
(let ((token (geiser-syntax--read/next-token)))