diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-03-06 00:47:05 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-03-06 00:47:05 +0100 |
commit | 038ed78d546d9d0112e9cdd568cc1a7bf11c7c81 (patch) | |
tree | 7197e57b6b8f1db7bde6b2d60d7b323b8085345b /elisp/geiser-edit.el | |
parent | 267fde61250a698c1abc8201ca2445a6f462d03a (diff) | |
download | geiser-038ed78d546d9d0112e9cdd568cc1a7bf11c7c81.tar.gz geiser-038ed78d546d9d0112e9cdd568cc1a7bf11c7c81.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.el | 14 |
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: |