summaryrefslogtreecommitdiff
path: root/elisp/geiser-edit.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-12 22:47:34 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-12 22:47:34 +0100
commit09c532a18d33ab2e0a3dcb3a38e746992e3381aa (patch)
tree8501dc3786cdaa06d7f11e346e23a7d5c2fe5692 /elisp/geiser-edit.el
parentfa17e0cb3367e68e8db386497ddcfe3cfcf96416 (diff)
downloadgeiser-guile-09c532a18d33ab2e0a3dcb3a38e746992e3381aa.tar.gz
geiser-guile-09c532a18d33ab2e0a3dcb3a38e746992e3381aa.tar.bz2
Faster M-.
Diffstat (limited to 'elisp/geiser-edit.el')
-rw-r--r--elisp/geiser-edit.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/elisp/geiser-edit.el b/elisp/geiser-edit.el
index d51246f..3a5618a 100644
--- a/elisp/geiser-edit.el
+++ b/elisp/geiser-edit.el
@@ -60,7 +60,7 @@
(cdr (assoc 'line loc)))
(defconst geiser-edit--def-re
- (regexp-opt '("define" "defmacro" "define-macro" "define-syntax")))
+ (regexp-opt '("define" "defmacro" "define-macro" "define-syntax" "define*")))
(defsubst geiser-edit--def-re (symbol)
(format "(%s +(?%s" geiser-edit--def-re symbol))
@@ -69,8 +69,9 @@
(if (numberp line)
(goto-line line)
(goto-char (point-min))
- (when (re-search-forward (geiser-edit--def-re symbol) nil t)
- (beginning-of-line))))
+ (when (or (re-search-forward (geiser-edit--def-re symbol) nil t)
+ (re-search-forward (format "\\_<%s\\_>" symbol) nil t))
+ (goto-char (match-beginning 0)))))
(defun geiser-edit--try-edit (symbol ret)
(let* ((loc (geiser-eval--retort-result ret))