summaryrefslogtreecommitdiff
path: root/elisp/geiser-edit.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-10-31 15:53:12 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-10-31 15:53:12 +0100
commitffd0a91a136909c4ed481184073e868ae886e230 (patch)
tree23dcbe372eaeee9c3029315254e41882a8026d42 /elisp/geiser-edit.el
parent449a5c9a05feed4f743d98172f78b250c6258d7a (diff)
parent9325189d4b3cfa2207c015b4f60cf397089edc9f (diff)
downloadgeiser-guile-ffd0a91a136909c4ed481184073e868ae886e230.tar.gz
geiser-guile-ffd0a91a136909c4ed481184073e868ae886e230.tar.bz2
Merge branch 'master' into guile-meta
Diffstat (limited to 'elisp/geiser-edit.el')
-rw-r--r--elisp/geiser-edit.el16
1 files changed, 14 insertions, 2 deletions
diff --git a/elisp/geiser-edit.el b/elisp/geiser-edit.el
index e8e439c..4d61edc 100644
--- a/elisp/geiser-edit.el
+++ b/elisp/geiser-edit.el
@@ -205,8 +205,10 @@ With prefix, asks for the symbol to edit."
(geiser-completion--read-symbol "Edit symbol: ")))
(cmd `(:eval (:ge symbol-location ',symbol)))
(marker (point-marker)))
- (geiser-edit--try-edit symbol (geiser-eval--send/wait cmd))
- (when marker (ring-insert find-tag-marker-ring marker))))
+ (condition-case nil
+ (progn (geiser-edit--try-edit symbol (geiser-eval--send/wait cmd))
+ (when marker (ring-insert find-tag-marker-ring marker)))
+ (error (geiser-edit-module-at-point)))))
(defun geiser-pop-symbol-stack ()
"Pop back to where \\[geiser-edit-symbol-at-point] was last invoked."
@@ -221,6 +223,16 @@ With prefix, asks for the symbol to edit."
(let ((cmd `(:eval (:ge module-location '(:module ,module)))))
(geiser-edit--try-edit module (geiser-eval--send/wait cmd) method)))
+
+(defun geiser-edit-module-at-point ()
+ "Opens a new window visiting the module at point."
+ (interactive)
+ (let ((marker (point-marker)))
+ (geiser-edit-module (or (geiser-completion--module-at-point)
+ (geiser-completion--read-module)))
+ (when marker (ring-insert find-tag-marker-ring marker))))
+
+
(provide 'geiser-edit)
;;; geiser-edit.el ends here