aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Emacs/.config/emacs/config.org20
1 files changed, 20 insertions, 0 deletions
diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org
index 8ade726..63e23b2 100644
--- a/Emacs/.config/emacs/config.org
+++ b/Emacs/.config/emacs/config.org
@@ -889,6 +889,26 @@ with abstracting a few things away.
"fmonth"
(format-time-string "%B" (current-time))))
#+end_src
+*** Skeletons
+Defining some basic skeletons
+#+begin_src emacs-lisp
+(use-package skeleton
+ :straight nil
+ :after abbrev
+ :config
+ (defmacro +snippets/gen-skeleton-abbrev (mode abbrev &rest skeleton)
+ (let* ((table (intern (concat (symbol-name mode) "-abbrev-table")))
+ (skeleton-name (intern (concat "+" "skeleton/" (symbol-name mode) "/" abbrev))))
+ `(progn
+ (define-skeleton
+ ,skeleton-name
+ ""
+ ,@skeleton)
+ (define-abbrev ,table
+ ,abbrev-name
+ ""
+ ',skeleton-name)))))
+#+end_src
*** Yasnippet default
:PROPERTIES:
:header-args:emacs-lisp: :tangle no