diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-06-29 00:08:44 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-06-29 00:08:44 +0200 |
commit | e01166f7d2f3551596a04474a76f4811fc841edc (patch) | |
tree | ee27568ad1d6b5e3e4e0f5c5bc568609d7dfd052 /elisp | |
parent | b0e3391ace36cf2bb111ed0c56883dd1e0cb4117 (diff) | |
download | geiser-e01166f7d2f3551596a04474a76f4811fc841edc.tar.gz geiser-e01166f7d2f3551596a04474a76f4811fc841edc.tar.bz2 |
Safer handling of file line and columns in emacs.
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))) |