Skip to content

Commit

Permalink
[Fix clojure-emacs#2408] Auto-link to sesman session on cider-find-var
Browse files Browse the repository at this point in the history
  • Loading branch information
vspinu committed Aug 30, 2018
1 parent 4dd1ff1 commit e016826
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
19 changes: 12 additions & 7 deletions cider-find.el
Expand Up @@ -59,13 +59,18 @@ the results to be displayed in a different window. The default value is
thing at point."
(interactive "P")
(cider-ensure-op-supported "info")
(if var
(cider--find-var var line)
(funcall (cider-prompt-for-symbol-function arg)
"Symbol"
(if (cider--open-other-window-p arg)
#'cider--find-var-other-window
#'cider--find-var))))
(let ((orig-buff (current-buffer))
(session (sesman-current-session 'CIDER)))
(if var
(cider--find-var var line)
(funcall (cider-prompt-for-symbol-function arg)
"Symbol"
(if (cider--open-other-window-p arg)
#'cider--find-var-other-window
#'cider--find-var)))
(when (and (not (eq orig-buff (current-buffer)))
session)
(sesman-link-session 'CIDER session))))

;;;###autoload
(defun cider-find-dwim-at-mouse (event)
Expand Down
2 changes: 1 addition & 1 deletion cider.el
Expand Up @@ -12,7 +12,7 @@
;; Maintainer: Bozhidar Batsov <bozhidar@batsov.com>
;; URL: http://www.github.com/clojure-emacs/cider
;; Version: 0.18.0-snapshot
;; Package-Requires: ((emacs "25") (clojure-mode "5.9") (pkg-info "0.4") (queue "0.2") (spinner "1.7") (seq "2.16") (sesman "0.2"))
;; Package-Requires: ((emacs "25") (clojure-mode "5.9") (pkg-info "0.4") (queue "0.2") (spinner "1.7") (seq "2.16") (sesman "0.3"))
;; Keywords: languages, clojure, cider

;; This program is free software: you can redistribute it and/or modify
Expand Down

0 comments on commit e016826

Please sign in to comment.