]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
snippets/cfengien3-mode/fileappend canonify filename for handle string with replace...
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 21 Nov 2014 08:13:59 +0000 (09:13 +0100)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Fri, 21 Nov 2014 08:13:59 +0000 (09:13 +0100)
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
snippets/cfengine3-mode/fileappend

index 093eb14e780dc96d476e8d95d1aa7f8c8f0b7f2a..18654ade3fbb2890c946d8cde3b3b41c8c619076 100644 (file)
@@ -3,9 +3,9 @@
 # key: fileappend
 # --
 "${1:file}"
-handle => "edit_$2",
+handle => "edit_${1:$(replace-regexp-in-string "[ /.-]" "_" (yas-text))}",
 comment => "configure $1",
 perms => mog("${3:644}","${4:root}","${5:root}"),
 create => "${6:$$(yas-choose-value '("true" "false"))}",
 edit_defaults => empty,
-edit_line => append_if_no_lines( "${7}" );
+edit_line => append_if_no_lines( "$7" );