From f87327d24465b3455ca000fce9798d45b1c84615 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 1 Jan 2015 22:59:22 -0500 Subject: Replace single-branch 'if' occurrences with 'when' --- snakemake-mode.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'snakemake-mode.el') 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 -- cgit v1.2.3