From 35cd14df7af22c461f01b67dfb8b96b62bf2744d Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Wed, 22 Jul 2020 18:13:24 -0700 Subject: [PATCH] cc-mode/if: escape backslashes Escaping lets the user choose between writing an unbraced `if` by pressing C-d, or continue with a braced `if` by pressing TAB. The current behavior when pressing C-d at this point is that there is an unbalanced right brace remaining. --- snippets/cc-mode/if | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snippets/cc-mode/if b/snippets/cc-mode/if index 8368971..5299bcd 100644 --- a/snippets/cc-mode/if +++ b/snippets/cc-mode/if @@ -2,6 +2,6 @@ # name: if (...) { ... } # key: if # -- -if (${1:condition}) ${2:{ +if (${1:condition}) ${2:\{ $0 -}} \ No newline at end of file +\}} \ No newline at end of file