diff options
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-edit.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/elisp/geiser-edit.el b/elisp/geiser-edit.el index 62b8a53..723e898 100644 --- a/elisp/geiser-edit.el +++ b/elisp/geiser-edit.el @@ -64,11 +64,15 @@ or following links in error buffers.") (defsubst geiser-edit--location-file (loc) (cdr (assoc 'file loc))) +(defsubst geiser-edit--to-number (x) + (cond ((numberp x) x) + ((stringp x) (string-to-number x)))) + (defsubst geiser-edit--location-line (loc) - (cdr (assoc 'line loc))) + (geiser-edit--to-number (cdr (assoc 'line loc)))) (defsubst geiser-edit--location-column (loc) - (cdr (assoc 'column loc))) + (geiser-edit--to-number (cdr (assoc 'column loc)))) (defsubst geiser-edit--make-location (name file line column) `((name . ,name) (file . ,file) (line . ,line) (column . ,column))) |