Skip to content
Open
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
9 changes: 4 additions & 5 deletions rustic-spellcheck.el
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"Buffer name for spellcheck buffers.")

(defvar rustic-spellcheck-arguments ""
"Holds arguments for 'cargo spellcheck', similar to `compilation-arguments`.")
"Holds arguments for `cargo spellcheck', similar to `compilation-arguments`.")

(defvar rustic-cargo-spellcheck-mode-map
(let ((map (make-sparse-keymap)))
Expand Down Expand Up @@ -90,7 +90,7 @@ Error matching regexes from compile.el are removed."

;;;###autoload
(defun rustic-cargo-spellcheck (&optional arg)
"Run 'cargo spellcheck'.
"Run `cargo spellcheck'.

If ARG is not nil, use value as argument and store it in
`rustic-spellcheck-arguments'. When calling this function from
Expand All @@ -104,18 +104,17 @@ If ARG is not nil, use value as argument and store it in
(t ""))))

(defun rustic-cargo-spellcheck-command (&optional spellcheck-args)
"Start compilation process for 'cargo spellcheck' with optional SPELLCHECK-ARGS."
"Start compilation process for `cargo spellcheck' with optional SPELLCHECK-ARGS."
(let* ((command (list (rustic-cargo-bin) "spellcheck"))
(c (append command (split-string (if spellcheck-args spellcheck-args ""))))
(spellcheck-command (string-join c " "))
(buf rustic-spellcheck-buffer-name)
(proc rustic-spellcheck-process-name)
(mode 'rustic-cargo-spellcheck-mode))
(rustic-spellcheck-compilation c (list :buffer buf :process proc :mode mode))))

;;;###autoload
(defun rustic-cargo-spellcheck-rerun ()
"Run 'cargo spellcheck' with `rustic-spellcheck-arguments'."
"Run `cargo spellcheck' with `rustic-spellcheck-arguments'."
(interactive)
(rustic-cargo-spellcheck-command rustic-spellcheck-arguments))

Expand Down