aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2015-01-01 22:59:22 -0500
committerKyle Meyer <kyle@kyleam.com>2015-01-09 23:53:40 -0500
commitf87327d24465b3455ca000fce9798d45b1c84615 (patch)
tree4707f68f936aba1f32f7282871ce1bb5e4787c30
parent6667ba4e813b5283e4e6a28ca25b9e7bf9bd8463 (diff)
downloadsnakemake-mode-f87327d24465b3455ca000fce9798d45b1c84615.tar.gz
Replace single-branch 'if' occurrences with 'when'
-rw-r--r--snakemake-mode.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/snakemake-mode.el b/snakemake-mode.el
index d67585d..385be8d 100644
--- a/snakemake-mode.el
+++ b/snakemake-mode.el
@@ -167,8 +167,8 @@ rule blocks (or on a blank line directly below), call
(delete-horizontal-space)
(when (< start-indent prev-col)
(indent-to prev-col))))))))
- (if (< (current-column) (current-indentation))
- (forward-to-indentation 0)))
+ (when (< (current-column) (current-indentation))
+ (forward-to-indentation 0)))
(defun snakemake-in-rule-or-subworkflow-block-p ()
"Return t if point is in block or on first blank line following one."
@@ -217,8 +217,8 @@ column of the first non-blank character."
;; key.
(let ((rule-re (concat "\\(?:" snakemake-field-key-indented-re
"\\)* *[^ ]")))
- (if (re-search-forward rule-re (point-at-eol) t)
- (1- (current-column))))))
+ (when (re-search-forward rule-re (point-at-eol) t)
+ (1- (current-column))))))
;;; Compilation