Skip to content

Commit

Permalink
Always set rustic-clippy-arguments in rustic-cargo-clippy
Browse files Browse the repository at this point in the history
This means that running `rustic-cargo-clippy-rerun` would use the same
arguments, even when `rustic-default-clippy-arguments` were used.
  • Loading branch information
Kritzefitz committed Nov 7, 2022
1 parent ab84300 commit e57139d
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions rustic-clippy.el
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,16 @@ If ARG is not nil, use value as argument and store it in `rustic-clippy-argument
When calling this function from `rustic-popup-mode', always use the value of
`rustic-clippy-arguments'."
(interactive "P")
(rustic-cargo-clippy-run
:params (cond (arg
(setq rustic-clippy-arguments (read-from-minibuffer "Cargo clippy arguments: " rustic-default-clippy-arguments)))
((eq major-mode 'rustic-popup-mode)
(if (> (length rustic-clippy-arguments) 0)
rustic-clippy-arguments
rustic-default-clippy-arguments))
(t
rustic-default-clippy-arguments))))
(setq rustic-clippy-arguments (cond
(arg
(read-from-minibuffer "Cargo clippy arguments: " rustic-default-clippy-arguments))
((eq major-mode 'rustic-popup-mode)
(if (> (length rustic-clippy-arguments) 0)
rustic-clippy-arguments
rustic-default-clippy-arguments))
(t
rustic-default-clippy-arguments)))
(rustic-cargo-clippy-run :params rustic-clippy-arguments))

;;;###autoload
(defun rustic-cargo-clippy-rerun ()
Expand Down

0 comments on commit e57139d

Please sign in to comment.