Skip to content

Commit

Permalink
Spellcheck warnings (brotzeit#14)
Browse files Browse the repository at this point in the history
* Use correct quotes in rust-spellcheck.el docstrings

Fixes

In toplevel form:
rustic-spellcheck.el:18:9: Warning: defvar ‘rustic-spellcheck-arguments’ docstring has wrong usage of unescaped single quotes (use \=' or different quoting such as `...')

In rustic-cargo-spellcheck:
rustic-spellcheck.el:92:2: Warning: docstring has wrong usage of unescaped single quotes (use \=' or different quoting such as `...')

In rustic-cargo-spellcheck-command:
rustic-spellcheck.el:106:2: Warning: docstring has wrong usage of unescaped single quotes (use \=' or different quoting such as `...')

In rustic-cargo-spellcheck-rerun:
rustic-spellcheck.el:117:2: Warning: docstring has wrong usage of unescaped single quotes (use \=' or different quoting such as `...')

* Remove unused variable in rustic-cargo-spellcheck-command

Fixes:

rustic-spellcheck.el:110:11: Warning: Unused lexical variable ‘spellcheck-command’

---------

Co-authored-by: Ola Nilsson <[email protected]>
  • Loading branch information
CeleritasCelery and snogge authored May 17, 2024
1 parent 7e51d36 commit f7a27a6
Showing 1 changed file with 4 additions and 5 deletions.
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

0 comments on commit f7a27a6

Please sign in to comment.