summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlendoit <blendoit@gmail.com>2020-11-10 18:59:44 -0800
committerBlendoit <blendoit@gmail.com>2020-11-10 18:59:44 -0800
commit942f394906eacbc13744d2fb82418e1302895265 (patch)
tree8b9ab396305629714948627a50b49cb1f7c23481
parent23a420c1ed37fede60e8bc9ad710b53b290be1d6 (diff)
Snippets
-rw-r--r--snippets/emacs-lisp-mode/add-hook3
-rw-r--r--snippets/emacs-lisp-mode/cond8
-rw-r--r--snippets/emacs-lisp-mode/defun4
3 files changed, 13 insertions, 2 deletions
diff --git a/snippets/emacs-lisp-mode/add-hook b/snippets/emacs-lisp-mode/add-hook
index 1fcf995..e1019e8 100644
--- a/snippets/emacs-lisp-mode/add-hook
+++ b/snippets/emacs-lisp-mode/add-hook
@@ -2,4 +2,5 @@
# name: add-hook
# key: hook
# --
-(add-hook '${1:mode-to-hook-on} '${2:function}) \ No newline at end of file
+(add-hook '${1:mode-to-hook-on} '${2:function})
+$0 \ No newline at end of file
diff --git a/snippets/emacs-lisp-mode/cond b/snippets/emacs-lisp-mode/cond
new file mode 100644
index 0000000..738ca0a
--- /dev/null
+++ b/snippets/emacs-lisp-mode/cond
@@ -0,0 +1,8 @@
+# -*- mode: snippet -*-
+# name: cond
+# key: cond
+# --
+(cond (${1:first-condition} ${2:first-return})
+ (${3:second-condition} ${4:second-return})
+ (t ${5:always-true-return}))
+$0 \ No newline at end of file
diff --git a/snippets/emacs-lisp-mode/defun b/snippets/emacs-lisp-mode/defun
index 80373b2..e67e483 100644
--- a/snippets/emacs-lisp-mode/defun
+++ b/snippets/emacs-lisp-mode/defun
@@ -3,5 +3,7 @@
# key: def
# --
(defun ${1:function-name} (${2:arguments})
- "${3:Docstring}"
+ "${3:Docstring: Indicate in imperitave voice what the function does.
+Second and subsequent lines must have nil indentation to preserve
+formatting in }"
$0) \ No newline at end of file
Copyright 2019--2024 Marius PETER