aboutsummaryrefslogtreecommitdiff
path: root/snakemake.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-10-26 21:57:16 -0400
committerKyle Meyer <kyle@kyleam.com>2016-10-26 21:57:16 -0400
commitd8012ab4661630283c4ac6521a094cbe09ea4707 (patch)
treea031a365b01a307b7e2cbc252be7f008442b3edf /snakemake.el
parent2bceb7f266f71cd85f9b328de02797eb457da17c (diff)
downloadsnakemake-mode-d8012ab4661630283c4ac6521a094cbe09ea4707.tar.gz
cosmetics: Use zerop instead of (= 0 ...)
Diffstat (limited to 'snakemake.el')
-rw-r--r--snakemake.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/snakemake.el b/snakemake.el
index 9ec7b42..fca801e 100644
--- a/snakemake.el
+++ b/snakemake.el
@@ -222,12 +222,12 @@ with DIRECTORY and the Snakefile's modification time."
TYPE can be `all' or `target'."
(snakemake--split-lines
(with-temp-buffer
- (if (= 0 (snakemake-insert-output
- "--nocolor"
- (cl-case type
- (all "--list")
- (target "--list-target-rules")
- (t (user-error "Invalid rule type: %s" type)))))
+ (if (zerop (snakemake-insert-output
+ "--nocolor"
+ (cl-case type
+ (all "--list")
+ (target "--list-target-rules")
+ (t (user-error "Invalid rule type: %s" type)))))
(buffer-string)
(error "Error finding rules")))
t))
@@ -250,7 +250,7 @@ The file list is determined by the output of
(snakemake-with-cache directory ("target-files")
(snakemake--split-lines
(with-temp-buffer
- (if (= 0 (call-process snakemake-file-target-program nil t))
+ (if (zerop (call-process snakemake-file-target-program nil t))
(buffer-string)
(error "Error finding file targets")))))))
@@ -271,7 +271,7 @@ exit status is non-zero.")
(goto-char (point-min))
(cond
((re-search-forward snakemake-valid-target-re nil t))
- ((and (= ex-code 0)
+ ((and (zerop ex-code)
;; Lean towards misclassifying targets as valid rather
;; than silently dropping valid targets as invalid.
(not (re-search-forward snakemake-invalid-target-re
@@ -483,7 +483,7 @@ $ snakemake -s <current file> --{dag,rulegraph} | display"
(setq ret-val (call-process snakemake-program nil t nil
(if rule-graph "--rulegraph" "--dag")
"--snakefile" file)))
- (if (= 0 ret-val)
+ (if (zerop ret-val)
(progn (image-mode)
(snakemake-graph-mode)
(setq snakemake-graph-id file))