diff options
Diffstat (limited to 'snippets/emacs-lisp-mode')
| -rw-r--r-- | snippets/emacs-lisp-mode/elisp-commentary-and-code | 7 | ||||
| -rw-r--r-- | snippets/emacs-lisp-mode/elisp-file-footer | 5 | ||||
| -rw-r--r-- | snippets/emacs-lisp-mode/elisp-header | 11 | ||||
| -rw-r--r-- | snippets/emacs-lisp-mode/elisp-ifthen | 13 | ||||
| -rw-r--r-- | snippets/emacs-lisp-mode/hydra | 15 |
5 files changed, 51 insertions, 0 deletions
diff --git a/snippets/emacs-lisp-mode/elisp-commentary-and-code b/snippets/emacs-lisp-mode/elisp-commentary-and-code new file mode 100644 index 00000000..a787580e --- /dev/null +++ b/snippets/emacs-lisp-mode/elisp-commentary-and-code @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: elisp-commentary-and-code +# key: >elc +# -- +;;; Commentary: + +;;; Code:
\ No newline at end of file diff --git a/snippets/emacs-lisp-mode/elisp-file-footer b/snippets/emacs-lisp-mode/elisp-file-footer new file mode 100644 index 00000000..8c41dc1e --- /dev/null +++ b/snippets/emacs-lisp-mode/elisp-file-footer @@ -0,0 +1,5 @@ +# key: >elfooter +# name: elisp-file-footer +# -- +(provide '`(file-name-base buffer-file-name)`) +;;; `(buffer-name)` ends here.
\ No newline at end of file diff --git a/snippets/emacs-lisp-mode/elisp-header b/snippets/emacs-lisp-mode/elisp-header new file mode 100644 index 00000000..7cc53ba5 --- /dev/null +++ b/snippets/emacs-lisp-mode/elisp-header @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# name: elisp-header +# key: >elheader +# -- +;;; `(file-name-nondirectory buffer-file-name)` --- $1 -*- coding: utf-8; lexical-binding: t; -*- + +;;; Commentary: +;; $0 + +;;; Code: + diff --git a/snippets/emacs-lisp-mode/elisp-ifthen b/snippets/emacs-lisp-mode/elisp-ifthen new file mode 100644 index 00000000..efe61f83 --- /dev/null +++ b/snippets/emacs-lisp-mode/elisp-ifthen @@ -0,0 +1,13 @@ +# -*- mode: snippet -*- +# name: elifthen +# key: >elifthen +# -- + +(if ($1 condition) + (progn + $2 ; if statements + ; go here + ) + $2 ; else statements + ; go here +)
\ No newline at end of file diff --git a/snippets/emacs-lisp-mode/hydra b/snippets/emacs-lisp-mode/hydra new file mode 100644 index 00000000..97bd4263 --- /dev/null +++ b/snippets/emacs-lisp-mode/hydra @@ -0,0 +1,15 @@ +# -*- mode: snippet -*- +# name: hydra +# key: <hydra +# -- + +(with-eval-after-load '$1 + (defhydra hydra-$2 (:color teal :timeout 10 :hint nil) + "$2 common commands menu" + ("q" quit-window "quit" :column "") + ) + + (defun $1-hook-hydra-setup () + "Create $2 hydra/menu keybinding when entering ledger mode." + (local-set-key (kbd "C-c ?") 'hydra-$2/body)) + (add-hook '$1-hook '$1-hook-hydra-setup)) |
