summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-06-29 00:08:44 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-06-29 00:08:44 +0200
commit25eb14784cc57ee585fb2eca4437caad243eee59 (patch)
tree427032ed30e070e97ff107ab632c457e34ea9ec6 /elisp
parentd0c74836bd62ec7adb853e8239af4005c1801aaf (diff)
downloadgeiser-chez-25eb14784cc57ee585fb2eca4437caad243eee59.tar.gz
geiser-chez-25eb14784cc57ee585fb2eca4437caad243eee59.tar.bz2
Safer handling of file line and columns in emacs.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-edit.el8
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)))