summaryrefslogtreecommitdiff
path: root/snakemake.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2016-04-17 18:26:30 -0400
committerKyle Meyer <kyle@kyleam.com>2016-04-17 19:05:03 -0400
commit2682860608862b99adbe830c289efe9897700fc1 (patch)
tree10e9b377bceee2494e546c4f71ef6db32ca839fa /snakemake.el
parent5c5a31aacb0e6c79646b316b7e6c02f68f7c7912 (diff)
downloadsnakemake-mode-2682860608862b99adbe830c289efe9897700fc1.tar.gz
snakemake-rule-at-point: Fix anonymous rule check
Diffstat (limited to 'snakemake.el')
-rw-r--r--snakemake.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/snakemake.el b/snakemake.el
index f2ca732..cc6bc3f 100644
--- a/snakemake.el
+++ b/snakemake.el
@@ -328,8 +328,9 @@ currently limited to a single-item list."
(re-search-backward snakemake-rule-or-subworkflow-re)
(let ((rule (and (string= (match-string-no-properties 1) "rule")
(match-string-no-properties 2))))
- (and (or (not targets-only) (snakemake-check-target rule))
- (list rule))))))
+ (when rule
+ (and (or (not targets-only) (snakemake-check-target rule))
+ (list rule)))))))
(defun snakemake--prompt (prompt default)
(concat prompt