diff options
author | Bozhidar Batsov <bozhidar@tradeo.com> | 2014-09-09 12:37:21 +0300 |
---|---|---|
committer | Bozhidar Batsov <bozhidar@tradeo.com> | 2014-09-09 12:37:21 +0300 |
commit | eed90f350822f218d6d3aea5abae464e495f50fa (patch) | |
tree | a9b47eb2726f923baa9490008f61795583312d32 /cider-interaction.el | |
parent | 85751103d64bcc4299664c78c7ea9a78cae60e45 (diff) |
Simplify var def lookup
The extra gymnastics are not needed now that interactive eval sets
the var location metadata.
Diffstat (limited to 'cider-interaction.el')
-rw-r--r-- | cider-interaction.el | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/cider-interaction.el b/cider-interaction.el index adc7b2c4..56033c37 100644 --- a/cider-interaction.el +++ b/cider-interaction.el @@ -713,20 +713,11 @@ When called interactively, this operates on point." "Jump to location give by INFO. INFO object is returned by `cider-var-info' or `cider-member-info'. OTHER-BUFFER is passed to `cider-jamp-to'." - (-if-let* ((line (nrepl-dict-get info "line")) - (file (nrepl-dict-get info "file")) - (buffer (unless (cider--tooling-file-p file) - (cider-find-file file)))) - (cider-jump-to buffer (cons line nil) other-buffer) - ;; var was created interactively and has no file info - (-if-let* ((ns (nrepl-dict-get info "ns")) - (name (nrepl-dict-get info "name")) - (buffer (cider-find-buffer ns)) - (pos (cider-locate-def name buffer line))) - (cider-jump-to buffer pos other-buffer) - (-if-let (name (nrepl-dict-get info "name")) - (message "No location found for %s" name) - (message "No source info"))))) + (let* ((line (nrepl-dict-get info "line")) + (file (nrepl-dict-get info "file")) + (buffer (unless (cider--tooling-file-p file) + (cider-find-file file)))) + (cider-jump-to buffer (cons line nil) other-buffer))) (defun cider-jump-to-var (&optional var line) "Jump to the definition of VAR, optionally at a specific LINE. |