Files
doom-emacs-work-conf/doom-snippets/doom-snippets-lib.elc

52 lines
4.0 KiB
Plaintext
Raw Normal View History

2026-01-29 09:42:33 +01:00
;ELC
;;; Compiled
;;; in Emacs version 30.2
;;; with all optimizations.
#@206 Preform BODY after moving over the trigger keyword.
Without this, tests like `bolp' would meaninglessly fail because the cursor is
always in front of the word that triggered this snippet.
(fn &rest BODY)
(byte-code "\301\302!\210\303\304\305\"\210\203+\306\307\310\"\210\306\311\312\"\210\306\313\314\"\210\306\315\316\"\210\306\317\320\"\210\306\321\322\"\210\301\207" [doom-snippets-enable-short-helpers require yasnippet defvaralias % yas-selected-text defalias !%! doom-snippets-newline-selected-newline !% doom-snippets-newline-selected %$ doom-snippets-newline-or-eol %without-trigger doom-snippets-without-trigger %format doom-snippets-format %expand doom-snippets-expand] 3)
(defalias 'doom-snippets-without-trigger '(macro . #[128 "\300\301BB\207" [progn (unless (memq (char-before) (list 32 10)) (backward-word))] 4 (#$ . 84)]))#@167 Return `yas-selected-text' (or `default').
If TRIM is non-nil, trim leading and trailing whitespace from
`yas-selected-text'/`default'.
(fn &optional DEFAULT TRIM)
(defalias 'doom-snippets-text #[512 "\206 \206 \301\203\302!\207\207" [yas-selected-text "" string-trim] 5 (#$ . 933)])#@424 Returns a formatted string.
Like `format', but with a custom spec:
%s The contents of your current selection (`yas-selected-text`)
%n A newline, if your current selection spans more than a single line
%e A newline, unless the point is at EOL
If `yas-selected-text` is empty, `DEFAULT` is used.
If `TRIM` is non-nil, whitespace on the ends of `yas-selected-text` is
trimmed.
(fn FORMAT &optional DEFAULT TRIM)
(defalias 'doom-snippets-format #[769 "\206 \206 \301\203\302!\202\211\303\304B\305\306!\307V\203&\310\202'\301B\311l\2031\301\2022\310BE\"\207" [yas-selected-text "" string-trim format-spec 115 110 doom-snippets-count-lines 1 "\n" 101] 11 (#$ . 1233)])#@91 Return `yas-selected-text' surrounded with newlines if it consists of more
than one line.
(defalias 'doom-snippets-newline-selected-newline #[0 "\300\301\302\303#\207" [doom-snippets-format "%n%s%n" nil t] 4 (#$ . 1932)])#@90 Return `yas-selected-text' prefixed with a newline if it consists of more
than one line.
(defalias 'doom-snippets-newline-selected #[0 "\300\301\302\303#\207" [doom-snippets-format "%n%s" nil t] 4 (#$ . 2159)])#@35 Return newline, unless at `eolp'.
(defalias 'doom-snippets-newline-or-eol #[0 "\300\301!\207" [doom-snippets-format "%e"] 2 (#$ . 2375)])#@45 Return how many lines are in STR.
(fn STR)
(defalias 'doom-snippets-count-lines #[257 "\211;\203\211\211\300\230\262\204\301\302\"G\207\303\207" ["" split-string "\\( \n\\|[\n ]\\)" 0] 4 (#$ . 2518)])#@123 Return t if point is preceded only by indentation.
Unlike `bolp', this ignores the trigger word for the current snippet.
(defalias 'doom-snippets-bolp #[0 "n\206$\212\300 \203\301 b\210\202`Sf\302\303D>\204\304v\210\305\306x\210n)\207" [region-active-p region-beginning 32 10 -1 " " nil] 3 (#$ . 2732)])#@237 Expand a snippet whose PROPERTY equals VALUE in MODE.
PROPERTY can be one of :uuid, :name, :key, or :file, and VALUE must be the
uuid/name/key/(absolute) filepath of the template you want to expand.
(fn PROPERTY VALUE &optional MODE)
(defalias 'doom-snippets-expand #[770 "\303\211\304\305!!\303\211\211:\203\216@\262\306\267\202u\307!\n>\204-\310\311\312D\"\210\313H\202v\307!\n>\204C\310\311\312D\"\210\314H\202v\307!\n>\204Y\310\311\312D\"\210\315H\202v\307!\n>\204o\310\311\312D\"\210\316H\202v\303\230\203\203\210\303\211\262\202\204\317\203\216A\262\202\f*\266\203\211\203\231\320!\207\321\322\"\207" [yas-choose-keys-first yas-choose-tables-first cl-struct-yas--template-tags nil yas--all-templates yas--get-snippet-tables #s(hash-table test eq purecopy t data (:uuid 29 :name 51 :key 73 :file 95)) type-of signal wrong-type-argument yas--template 9 3 1 6 t yas-expand-snippet error "Couldn't find %S snippet"] 12 (#$ . 3051)])
(provide 'doom-snippets-lib)