summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cider-client.el9
-rw-r--r--cider-debug.el2
-rw-r--r--cider-interaction.el11
-rw-r--r--cider-mode.el2
-rw-r--r--cider-stacktrace.el20
-rw-r--r--cider-util.el11
6 files changed, 34 insertions, 21 deletions
diff --git a/cider-client.el b/cider-client.el
index 6f9eeb01..368a3fa7 100644
--- a/cider-client.el
+++ b/cider-client.el
@@ -976,7 +976,10 @@ CONTEXT represents a completion context for compliment."
eldoc)))
(defun cider-sync-request:spec-list (&optional filter-regex)
- "Get a list of the available specs in the registry."
+ "Get a list of the available specs in the registry.
+
+Optional argument FILTER-REGEX filters specs. By default, all specs are
+returned."
(setq filter-regex (or filter-regex ""))
(thread-first `("op" "spec-list"
"filter-regex" ,filter-regex)
@@ -984,14 +987,14 @@ CONTEXT represents a completion context for compliment."
(nrepl-dict-get "spec-list")))
(defun cider-sync-request:spec-form (spec)
- "Get spec form from registry"
+ "Get SPEC's form from registry."
(thread-first `("op" "spec-form"
"spec-name" ,spec)
(cider-nrepl-send-sync-request)
(nrepl-dict-get "spec-form")))
(defun cider-sync-request:spec-example (spec)
- "Get a spec example"
+ "Get an example for SPEC."
(thread-first `("op" "spec-example"
"spec-name" ,spec)
(cider-nrepl-send-sync-request)
diff --git a/cider-debug.el b/cider-debug.el
index 6b31bb8e..3bb9f784 100644
--- a/cider-debug.el
+++ b/cider-debug.el
@@ -396,7 +396,7 @@ In order to work properly, this mode must be activated by
["Customize" (customize-group 'cider-debug)]))
(defun cider--uppercase-command-p ()
- "Return true if the last command was uppercase letter."
+ "Return non-nil if the last command was uppercase letter."
(ignore-errors
(let ((case-fold-search nil))
(string-match "[[:upper:]]" (string last-command-event)))))
diff --git a/cider-interaction.el b/cider-interaction.el
index 03625564..9fe48f48 100644
--- a/cider-interaction.el
+++ b/cider-interaction.el
@@ -1068,8 +1068,8 @@ evaluation command. Honor `cider-auto-jump-to-error'."
(defun cider--prep-interactive-eval (form connection)
"Prepare the environment for an interactive eval of FORM in CONNECTION.
Ensure the current ns declaration has been evaluated (so that the ns
-containing FORM exists). Cache ns-form in the current buffer unless FORM is
-ns declaration itself. Clear any compilation highlights and kill the error
+containing FORM exists). Cache ns-form in the current buffer unless FORM is
+ns declaration itself. Clear any compilation highlights and kill the error
window."
(cider--clear-compilation-highlights)
(cider--quit-error-window)
@@ -1366,7 +1366,7 @@ If invoked with a prefix ARG eval the expression after inserting it."
(defun cider-enable-on-existing-clojure-buffers ()
"Enable CIDER's minor mode on existing Clojure buffers.
-See `cider-mode'."
+See command `cider-mode'."
(interactive)
(add-hook 'clojure-mode-hook #'cider-mode)
(dolist (buffer (cider-util--clojure-buffers))
@@ -1374,15 +1374,14 @@ See `cider-mode'."
(cider-mode +1))))
(defun cider-disable-on-existing-clojure-buffers ()
- "Disable `cider-mode' on existing Clojure buffers.
-See `cider-mode'."
+ "Disable command `cider-mode' on existing Clojure buffers."
(interactive)
(dolist (buffer (cider-util--clojure-buffers))
(with-current-buffer buffer
(cider-mode -1))))
(defun cider-possibly-disable-on-existing-clojure-buffers ()
- "If not connected, disable `cider-mode' on existing Clojure buffers."
+ "If not connected, disable command `cider-mode' on existing Clojure buffers."
(unless (cider-connected-p)
(cider-disable-on-existing-clojure-buffers)))
diff --git a/cider-mode.el b/cider-mode.el
index 68dd0538..5d0c6115 100644
--- a/cider-mode.el
+++ b/cider-mode.el
@@ -122,7 +122,7 @@ that of the namespace in the Clojure source buffer."
(defun cider-switch-to-repl-buffer (&optional set-namespace)
"Select the REPL buffer, when possible in an existing window.
-The buffer chosen is based on the file open in the current buffer. If
+The buffer chosen is based on the file open in the current buffer. If
multiple REPL buffers are associated with current connection the most
recent is used.
diff --git a/cider-stacktrace.el b/cider-stacktrace.el
index db74b8bd..e82d4869 100644
--- a/cider-stacktrace.el
+++ b/cider-stacktrace.el
@@ -246,14 +246,19 @@ The error types are represented as strings."
(defvar cider-stacktrace--all-negative-filters
'(clj tooling dup java repl)
- "Filters that remove stackframes")
+ "Filters that remove stackframes.")
(defvar cider-stacktrace--all-positive-filters
'(project)
- "Filters that ensure stackframes are shown")
+ "Filters that ensure stackframes are shown.")
(defun cider-stacktrace--face-for-filter (filter neg-filters pos-filters)
- "Return whether we should mark the filter is active or not."
+ "Return whether we should mark the FILTER is active or not.
+
+NEG-FILTERS and POS-FILTERS are lists of filters to check FILTER's type.
+
+NEG-FILTERS dictate which frames should be hidden while POS-FILTERS can
+override this and ensure that those frames are shown."
(cond ((member filter cider-stacktrace--all-negative-filters)
(if (member filter neg-filters)
'cider-stacktrace-filter-active-face
@@ -273,7 +278,7 @@ The error types are represented as strings."
Find buttons with a 'filter property; if filter is a member of FILTERS, or
if filter is nil ('show all') and the argument list is non-nil, fontify the
button as disabled. Upon finding text with a 'hidden-count property, stop
-searching and update the hidden count text. POS-FILTERS is the list of
+searching and update the hidden count text. POS-FILTERS is the list of
positive filters to always include."
(with-current-buffer cider-error-buffer
(save-excursion
@@ -606,7 +611,10 @@ prompt and whether to use a new window. Similar to `cider-find-var'."
(fill-region beg (point)))))
(defun cider-stacktrace-render-filters (buffer special-filters filters)
- "Emit into BUFFER toggle buttons for each of the FILTERS."
+ "Emit into BUFFER toggle buttons for each of the FILTERS.
+
+SPECIAL-FILTERS are filters that show stack certain stack frames, hiding
+others."
(with-current-buffer buffer
(insert " Show: ")
(dolist (filter special-filters)
@@ -627,7 +635,7 @@ prompt and whether to use a new window. Similar to `cider-find-var'."
'help-echo (format "Toggle %s stack frames"
(car filter)))
(insert " "))
-
+
(let ((hidden "(0 frames hidden)"))
(put-text-property 0 (length hidden) 'hidden-count t hidden)
(insert " " hidden "\n"))))
diff --git a/cider-util.el b/cider-util.el
index 497f863f..1b487252 100644
--- a/cider-util.el
+++ b/cider-util.el
@@ -67,12 +67,12 @@ Setting this to nil removes the fontification restriction."
default-directory))
(defun cider-in-string-p ()
- "Return true if point is in a string."
+ "Return non-nil if point is in a string."
(let ((beg (save-excursion (beginning-of-defun) (point))))
(nth 3 (parse-partial-sexp beg (point)))))
(defun cider-in-comment-p ()
- "Return true if point is in a comment."
+ "Return non-nil if point is in a comment."
(let ((beg (save-excursion (beginning-of-defun) (point))))
(nth 4 (parse-partial-sexp beg (point)))))
@@ -84,7 +84,7 @@ which nREPL uses for temporary evaluation file names."
(string-match-p "^form-init" fname)))
(defun cider--cljc-or-cljx-buffer-p (&optional buffer)
- "Return true if the current buffer is visiting a cljc or cljx file.
+ "Return non-nil if the current buffer is visiting a cljc or cljx file.
If BUFFER is provided act on that buffer instead."
(with-current-buffer (or buffer (current-buffer))
@@ -475,7 +475,10 @@ the buffer."
;; Taken from: https://github.com/emacs-mirror/emacs/blob/65c8c7cb96c14f9c6accd03cc8851b5a3459049e/lisp/help-mode.el#L551-L565
(defun cider--make-back-forward-xrefs (&optional buffer)
- "Insert special references `back' and `forward', as in `help-make-xrefs'"
+ "Insert special references `back' and `forward', as in `help-make-xrefs'.
+
+Optional argument BUFFER is the buffer in which to insert references.
+Default is current buffer."
(with-current-buffer (or buffer (current-buffer))
(insert "\n")
(when (or help-xref-stack help-xref-forward-stack)