Skip to content

Commit

Permalink
Merge pull request kwrooijen#90 from r-darwish/cargo-outdated
Browse files Browse the repository at this point in the history
Add cargo-outdated
  • Loading branch information
kwrooijen authored Aug 16, 2019
2 parents 626fd89 + feb844d commit f70b060
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions cargo-process.el
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
;; * cargo-process-add - Run the optional cargo command add.
;; * cargo-process-rm - Run the optional cargo command rm.
;; * cargo-process-upgrade - Run the optional cargo command upgrade.
;; * cargo-process-outdated - Run the optional cargo command outdated.

;;
;;; Code:
Expand Down Expand Up @@ -144,6 +145,9 @@
(defcustom cargo-process--command-fmt "fmt"
"Subcommand used by `cargo-process-fmt'.")

(defcustom cargo-process--command-outdated "outdated -R"
"Subcommand used by `cargo-process-outdated'.")

(defcustom cargo-process--command-check "check"
"Subcommand used by `cargo-process-check'.")

Expand Down Expand Up @@ -564,6 +568,14 @@ Requires Cargo Fmt to be installed."
(interactive)
(cargo-process--start "Fmt" cargo-process--command-fmt))

;;;###autoload
(defun cargo-process-outdated ()
"Run the Cargo outdated command.
With the prefix argument, modify the command's invocation.
Requires Cargo Outdated to be installed."
(interactive)
(cargo-process--start "Outdated" cargo-process--command-outdated))

;;;###autoload
(defun cargo-process-check ()
"Run the Cargo check command.
Expand Down
2 changes: 2 additions & 0 deletions cargo.el
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
;; * C-c C-c C-c - cargo-process-repeat
;; * C-c C-c C-f - cargo-process-current-test
;; * C-c C-c C-o - cargo-process-current-file-tests
;; * C-c C-c C-O - cargo-process-outdated
;; * C-c C-c C-m - cargo-process-fmt
;; * C-c C-c C-k - cargo-process-check
;; * C-c C-c C-K - cargo-process-clippy
Expand Down Expand Up @@ -82,6 +83,7 @@
(define-key cargo-minor-mode-map (kbd "C-c C-c C-c") 'cargo-process-repeat)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-f") 'cargo-process-current-test)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-o") 'cargo-process-current-file-tests)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-S-o") 'cargo-process-outdated)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-m") 'cargo-process-fmt)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-k") 'cargo-process-check)
(define-key cargo-minor-mode-map (kbd "C-c C-c C-S-k") 'cargo-process-clippy)
Expand Down

0 comments on commit f70b060

Please sign in to comment.