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
commit65d76d0f505a46a5059ced2d1f095ad42bff8388 (patch)
tree8818bddd076b01f3e1d3ebead59c2f19aadbd1b7 /elisp/geiser-edit.el
parent8dd0179dd8dad47df7f7ea09377f4a6617992edd (diff)
downloadgeiser-65d76d0f505a46a5059ced2d1f095ad42bff8388.tar.gz
geiser-65d76d0f505a46a5059ced2d1f095ad42bff8388.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))