summaryrefslogtreecommitdiff
path: root/elisp/geiser-edit.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-06 00:47:05 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-06 00:47:05 +0100
commit754aa7a194c412f52b4733142566ed5e33a04f4f (patch)
tree7296e1cfde7208e5c244e72355eab820c6de2470 /elisp/geiser-edit.el
parent9e91cef8b3d10e7eab88cc16d425fefc36c7321d (diff)
downloadgeiser-chez-754aa7a194c412f52b4733142566ed5e33a04f4f.tar.gz
geiser-chez-754aa7a194c412f52b4733142566ed5e33a04f4f.tar.bz2
New command to display generic methods (C-cC-dg) implemented.
Diffstat (limited to 'elisp/geiser-edit.el')
-rw-r--r--elisp/geiser-edit.el14
1 files changed, 8 insertions, 6 deletions
diff --git a/elisp/geiser-edit.el b/elisp/geiser-edit.el
index e504b30..e5c30eb 100644
--- a/elisp/geiser-edit.el
+++ b/elisp/geiser-edit.el
@@ -44,7 +44,7 @@
(geiser-edit--define-custom-visit
geiser-edit-symbol-method geiser-mode
- "How the new buffer is opened when invoking \\[geiser-edit-symbol-at-point]")
+ "How the new buffer is opened when invoking \\[geiser-edit-symbol-at-point].")
;;; Auxiliar functions:
@@ -83,15 +83,17 @@
(re-search-forward (geiser-edit--symbol-re symbol) nil t))
(goto-char (match-beginning 0)))))
-(defun geiser-edit--try-edit (symbol ret)
- (let* ((loc (geiser-eval--retort-result ret))
- (file (geiser-edit--location-file loc))
- (line (geiser-edit--location-line loc)))
+(defun geiser-edit--try-edit-location (symbol loc &optional method)
+ (let ((file (geiser-edit--location-file loc))
+ (line (geiser-edit--location-line loc)))
(unless file (error "Couldn't find edit location for '%s'" symbol))
(unless (file-readable-p file) (error "Couldn't open '%s' for read" file))
- (geiser-edit--visit-file file geiser-edit-symbol-method)
+ (geiser-edit--visit-file file (or method geiser-edit-symbol-method))
(geiser-edit--goto-line symbol line)))
+(defsubst geiser-edit--try-edit (symbol ret)
+ (geiser-edit--try-edit-location symbol (geiser-eval--retort-result ret)))
+
;;; Commands: