diff options
Diffstat (limited to 'resources/snippets/emacs-lisp-mode')
-rw-r--r-- | resources/snippets/emacs-lisp-mode/add-hook | 6 | ||||
-rw-r--r-- | resources/snippets/emacs-lisp-mode/cond | 8 | ||||
-rw-r--r-- | resources/snippets/emacs-lisp-mode/defun | 9 | ||||
-rw-r--r-- | resources/snippets/emacs-lisp-mode/if | 7 | ||||
-rw-r--r-- | resources/snippets/emacs-lisp-mode/lambda | 7 | ||||
-rw-r--r-- | resources/snippets/emacs-lisp-mode/setq | 5 |
6 files changed, 42 insertions, 0 deletions
diff --git a/resources/snippets/emacs-lisp-mode/add-hook b/resources/snippets/emacs-lisp-mode/add-hook new file mode 100644 index 0000000..e1019e8 --- /dev/null +++ b/resources/snippets/emacs-lisp-mode/add-hook @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: add-hook +# key: hook +# -- +(add-hook '${1:mode-to-hook-on} '${2:function}) +$0
\ No newline at end of file diff --git a/resources/snippets/emacs-lisp-mode/cond b/resources/snippets/emacs-lisp-mode/cond new file mode 100644 index 0000000..738ca0a --- /dev/null +++ b/resources/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/resources/snippets/emacs-lisp-mode/defun b/resources/snippets/emacs-lisp-mode/defun new file mode 100644 index 0000000..e67e483 --- /dev/null +++ b/resources/snippets/emacs-lisp-mode/defun @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: defun +# key: def +# -- +(defun ${1:function-name} (${2:arguments}) + "${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 diff --git a/resources/snippets/emacs-lisp-mode/if b/resources/snippets/emacs-lisp-mode/if new file mode 100644 index 0000000..8b464af --- /dev/null +++ b/resources/snippets/emacs-lisp-mode/if @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: if +# key: if +# -- +(if (${1:condition}) + (${2:then}) + ${3:else})
\ No newline at end of file diff --git a/resources/snippets/emacs-lisp-mode/lambda b/resources/snippets/emacs-lisp-mode/lambda new file mode 100644 index 0000000..9d11249 --- /dev/null +++ b/resources/snippets/emacs-lisp-mode/lambda @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: lambda +# key: lambda +# -- +(lambda (${1:argument(s)}) + "${2:Docstring}" + $0)
\ No newline at end of file diff --git a/resources/snippets/emacs-lisp-mode/setq b/resources/snippets/emacs-lisp-mode/setq new file mode 100644 index 0000000..f315eae --- /dev/null +++ b/resources/snippets/emacs-lisp-mode/setq @@ -0,0 +1,5 @@ +# -*- mode: snippet -*- +# name: setq +# key: setq +# -- +(setq $0)
\ No newline at end of file |