diff options
Diffstat (limited to 'elisp/geiser-syntax.el')
-rw-r--r-- | elisp/geiser-syntax.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el index 6d05f57..e22344e 100644 --- a/elisp/geiser-syntax.el +++ b/elisp/geiser-syntax.el @@ -171,6 +171,14 @@ ((char string atom) (cdr token)) (t (error "Reading scheme syntax: unexpected token: %s" token))))) +(defun geiser-syntax--read-from-string (string &optional start end) + (when (stringp string) + (let ((start (or start 0)) + (end (or end (length string)))) + (with-temp-buffer + (save-excursion (insert string)) + (cons (ignore-errors (geiser-syntax--read)) (point)))))) + (defsubst geiser-syntax--read/keyword-value (s) (and (consp s) (eq (car s) :keyword) (cdr s))) |