diff options
author | Kyle Meyer <kyle@kyleam.com> | 2017-01-13 23:29:50 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2017-01-16 18:51:46 -0500 |
commit | 0ca7307ae9c4931067925d9bf0b85059a17f6933 (patch) | |
tree | eca3569adf65f0db02be251253f6b3ead598cc24 | |
parent | 245f6dd7ebf4efaee769528f16394c6b1c0b7040 (diff) | |
download | emacs.d-0ca7307ae9c4931067925d9bf0b85059a17f6933.tar.gz |
snippets: Add R commandArgs template
-rw-r--r-- | snippets/ess-mode/command-args | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/snippets/ess-mode/command-args b/snippets/ess-mode/command-args new file mode 100644 index 0000000..87b6643 --- /dev/null +++ b/snippets/ess-mode/command-args @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: command args +# key: cargs +# -- +args <- commandArgs(trailingOnly = TRUE) +if (length(args) != $1) + stop("Usage: `(file-name-nondirectory (buffer-file-name))` $2") + +$0 <- args[1] |