summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2020-05-10 19:11:04 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2020-05-10 19:11:04 +0100
commitff17a4382eb77558fc7e00ef64893acad6c0f93d (patch)
tree9980cc0c36d564388529a62a9d4b8eee550dd623
parentc25a0562962c0f4dfbdc81b4662609f7df715b98 (diff)
downloadgeiser-ff17a4382eb77558fc7e00ef64893acad6c0f93d.tar.gz
geiser-ff17a4382eb77558fc7e00ef64893acad6c0f93d.tar.bz2
Better handcrafted reader, now with numbers!
For no good reason, we were transforming numbers in retorts to symbols and then failing to recognise things like line or column numbers there. The "fix" here only works for the intersection of numbers that are written in the same way in elisp and scheme; one day we'll find a situation where this doesn't cut it, but right now we only really use integers.
-rw-r--r--elisp/geiser-syntax.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index c0c379a..7069f2b 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -1,6 +1,6 @@
;;; geiser-syntax.el -- utilities for parsing scheme syntax
-;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2019 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2019, 2020 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -235,7 +235,8 @@ 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/symbol))))))
+ (t (let ((x (geiser-syntax--read/elisp)))
+ (cons 'atom (if (atom x) x (geiser-syntax--read/symbol))))))))
(defsubst geiser-syntax--read/match (&rest tks)
(let ((token (geiser-syntax--read/next-token)))