Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cider-eldoc.el
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ if the maximum number of sexps to skip is exceeded."
(error))
(while
(let ((p (point)))
(forward-sexp -1)
(clojure-backward-logical-sexp 1)
(when (< (point) p)
(setq num-skipped-sexps
(unless (and cider-eldoc-max-num-sexps-to-skip
Expand Down Expand Up @@ -346,7 +346,7 @@ Then go back to the point and return its eldoc."

(defun cider-eldoc-info-in-current-sexp ()
"Return eldoc information from the sexp.
If `cider-eldoc-display-for-symbol-at-poin' is non-nil and
If `cider-eldoc-display-for-symbol-at-point' is non-nil and
the symbol at point has a valid eldoc available, return that.
Otherwise return the eldoc of the first symbol of the sexp."
(or (when cider-eldoc-display-for-symbol-at-point
Expand Down Expand Up @@ -412,7 +412,7 @@ This includes the arglist and ns and symbol name (if available)."
"type" type)))
;; add context dependent args if requested by defcustom
;; do not cache this eldoc info to avoid showing info
;: of the previous context
;; of the previous context
(if cider-eldoc-display-context-dependent-info
(cond
;; add inputs of datomic query
Expand Down
11 changes: 9 additions & 2 deletions cider-eval.el
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@ when `cider-auto-inspect-after-eval' is non-nil."
(lambda (_buffer out)
(cider-emit-interactive-eval-output out))
(lambda (_buffer err)
(cider-emit-interactive-eval-err-output err)
(unless cider-show-error-buffer
;; Display errors as temporary overlays
(let ((cider-result-use-clojure-font-lock nil))
Expand Down Expand Up @@ -822,19 +823,23 @@ comment prefix to use."
(insert (concat comment-prefix
res "\n"))))
(when cider-eval-register
(set-register cider-eval-register value))))))
(set-register cider-eval-register res))))))

(defun cider-maybe-insert-multiline-comment (result comment-prefix continued-prefix comment-postfix)
"Insert eval RESULT at current location if RESULT is not empty.
RESULT will be preceded by COMMENT-PREFIX.
CONTINUED-PREFIX is inserted for each additional line of output.
COMMENT-POSTFIX is inserted after final text output."
(unless (string= result "")
(let ((lines (split-string result "[\n]+" t)))
(clojure-indent-line)
(let ((lines (split-string result "[\n]+" t))
(beg (point))
(col (current-indentation)))
;; only the first line gets the normal comment-prefix
(insert (concat comment-prefix (pop lines)))
(dolist (elem lines)
(insert (concat "\n" continued-prefix elem)))
(indent-rigidly beg (point) col)
(unless (string= comment-postfix "")
(insert comment-postfix)))))

Expand All @@ -857,6 +862,8 @@ COMMENT-POSTFIX is the text to output after the last line."
(with-current-buffer buffer
(save-excursion
(goto-char (marker-position location))
;; edge case: defun at eob
(unless (bolp) (insert "\n"))
(cider-maybe-insert-multiline-comment res comment-prefix continued-prefix comment-postfix)))
(when cider-eval-register
(set-register cider-eval-register res)))
Expand Down
1 change: 1 addition & 0 deletions cider-inspector.el
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ MAX-COLL-SIZE if non nil."
(cider-inspector-render cider-inspector-buffer value)
(cider-popup-buffer-display cider-inspector-buffer cider-inspector-auto-select-buffer)
(when cider-inspector-fill-frame (delete-other-windows))
(ignore-errors (cider-inspector-next-inspectable-object 1))
(with-current-buffer cider-inspector-buffer
(when (eq cider-inspector-last-command 'cider-inspector-pop)
(setq cider-inspector-last-command nil)
Expand Down
3 changes: 2 additions & 1 deletion cider-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,8 @@ See \(info \"(elisp) Special Properties\")"
(while-no-input
(when (and (bufferp obj)
(cider-connected-p)
cider-use-tooltips (not help-at-pt-display-when-idle))
cider-use-tooltips
(not (eq help-at-pt-display-when-idle t)))
(with-current-buffer obj
(ignore-errors
(save-excursion
Expand Down
6 changes: 3 additions & 3 deletions cider-repl.el
Original file line number Diff line number Diff line change
Expand Up @@ -1229,9 +1229,9 @@ command will prompt for the name of the namespace to switch to."
;; NOTE: `require' and `in-ns' are special forms in ClojureScript.
;; That's why we eval them separately instead of combining them with `do'.
(when cider-repl-require-ns-on-set
(cider-nrepl-sync-request:eval (format "(require '%s)" ns) connection))
(cider-nrepl-request:eval (format "(in-ns '%s)" ns)
(cider-repl-switch-ns-handler connection)))))
(cider-sync-tooling-eval (format "(require '%s)" ns) nil connection))
(cider-tooling-eval (format "(in-ns '%s)" ns)
(cider-repl-switch-ns-handler connection)))))


;;; Location References
Expand Down
3 changes: 1 addition & 2 deletions cider-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ Add to this list to have CIDER recognize additional test defining macros."
;; "run the test at point". But it's not as nice as rerunning all tests in
;; this buffer.
(define-key map "g" #'cider-test-run-test)
(define-key map "q" #'cider-popup-buffer-quit-function)
(easy-menu-define cider-test-report-mode-menu map
"Menu for CIDER's test result mode"
'("Test-Report"
Expand All @@ -209,7 +208,7 @@ Add to this list to have CIDER recognize additional test defining macros."
["Display expected/actual diff" cider-test-ediff]))
map))

(define-derived-mode cider-test-report-mode fundamental-mode "Test Report"
(define-derived-mode cider-test-report-mode cider-popup-buffer-mode "Test Report"
"Major mode for presenting Clojure test results.

\\{cider-test-report-mode-map}"
Expand Down