This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun transient-map (keymap &optional pred onexit) | |
| (defalias (-> ((user-error "It's an active map!") | |
| (-contains? (current-active-maps)) | |
| (-compose 'symbol-value 'eq keymap) | |
| (-andfn 'mapatoms 'boundp 'keymapp) | |
| (-orfn (catch 'found) (cl-gens)))) | |
| (lambda (interactive "p") (keymap pred onexit) | |
| (set-transient-map keymap pred onexit)))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $${1:{${2:`(incf n)`}:${3:$(capitalize yas-text)}}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -- | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: snippet; require-final-newline: nil -*- | |
| # name: $ | |
| # key: $ | |
| # binding: direct-keybinding | |
| # -- | |
| ${1:${2:${3:foo }bar }baz } | |
| ${4:foo }${5:bar }${6:baz } | |
| ${7:foo ${8:bar ${9:baz }}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun names-introspect-replace-labels (fn form) | |
| (let* ((vars names--var-list) | |
| (bindings (--> (-map 'symbol-value vars) | |
| (-interleave vars it) | |
| (-partition 2 it)))) | |
| `(lexical-let ,bindings ,form) | |
| )) | |
| (defmacro names-introspect-replace-labels-1 (bindings form) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun names-introspect-replace-labels (fn form) | |
| (let* ((vars names--var-list) | |
| (bindings (--> (-map 'symbol-value vars) | |
| (-interleave vars it) | |
| (-partition 2 it)))) | |
| `(lexical-let ,bindings ',@form))) | |
| (lexical-let ((names--name new-) | |
| (names--regexp "\\`new-") | |
| (names--bound nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (there-could-be-any number of args | |
| on | |
| first | |
| line | |
| ) | |
| (and-i-want following lines to continue | |
| with | |
| minimal | |
| indent) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ncaa/add-handler | |
| :for window | |
| :name ncaa/selected-window-if-changed | |
| (lambda (fn &rest args) | |
| ((starting-window (selected-window))) | |
| (unless (eq starting-window (selected-window)) | |
| (prog1 (selected-window) | |
| (select-window starting-window))))) | |
| (ncaa/add-handler |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "\n\\s-*\"\"\"\\s-*\n\\(?:\\\\\"\"\"\\|[^\"]\"\"\\|[^\"]\"\\|[^\"]\\)+?\"\"\"" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (add-hook 'eval-expression-minibuffer-setup-hook | |
| (defun setup-repeat () | |
| (local-set-key (this-command-keys) | |
| (lambda nil (interactive) | |
| (command-execute 'previous-history-element) | |
| (command-execute 'exit-minibuffer nil (vconcat (kbd "RET"))))))) |