[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tempel db6847a7f9 56/82: Make temple-key a macro
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tempel db6847a7f9 56/82: Make temple-key a macro |
Date: |
Sun, 9 Jan 2022 20:58:45 -0500 (EST) |
branch: externals/tempel
commit db6847a7f994e9f4d9a5f9f0cb37264fc84a8049
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Make temple-key a macro
---
tempel.el | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tempel.el b/tempel.el
index cad63e0cfa..aa03aab2cd 100644
--- a/tempel.el
+++ b/tempel.el
@@ -425,11 +425,12 @@ If called interactively, select a template with
`completing-read'."
(tempel--region))))
;;;###autoload
-(defun tempel-key (key name &optional map)
+(defmacro tempel-key (key name &optional map)
"Bind KEY to NAME in MAP."
(let ((cmd (intern (format "tempel-insert-%s" name))))
- (fset cmd (lambda () (interactive) (tempel-insert name)))
- (define-key (or map global-map) (kbd key) cmd)))
+ `(progn
+ (defun ,cmd () (interactive) (tempel-insert ',name))
+ (define-key ,(or map 'global-map) ,(kbd key) #',cmd))))
(provide 'tempel)
;;; tempel.el ends here
- [elpa] externals/tempel ad71c25632 32/82: Add syntax extension (p (FORM...) <NAME>), (continued)
- [elpa] externals/tempel ad71c25632 32/82: Add syntax extension (p (FORM...) <NAME>), ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 5dbdc76eb2 74/82: Specify the completion category tempel, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 65a3eb0458 76/82: Improve abbreviation expansion, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 57bbc5e681 78/82: README update, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel ac3df540a4 69/82: Remove underlines from faces, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 7cf25bd795 71/82: Simplify templates data structure at load time, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 69f7cb3212 06/82: Reimplement without Tempo for more flexibility, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel fbef94d77d 48/82: Minor cleanup, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 01e7430343 27/82: Add docstrings, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel a03c36c8dd 02/82: Improve behavior when templates are nested, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel db6847a7f9 56/82: Make temple-key a macro,
ELPA Syncer <=
- [elpa] externals/tempel 0e618cd169 23/82: Do not sort overlays, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 04d4f6c055 55/82: Use named key function, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 91f6978ddd 60/82: Use Tempo PROMPT as default value, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel e20f982dc5 25/82: Remove global variable tempel--state, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel fa99fb7f96 34/82: README: Update keybindings, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel c4cd6e0f69 73/82: Rename tempel-expand -> tempel-complete, add tempel-expand (Fix #13), ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 8f8588985a 04/82: Simplify template markers, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel d9efb707b3 20/82: Improve undo behavior, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 4bc75c1aba 52/82: Use the more subtle face colors from Modus, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 52d8556c05 57/82: Improve annotation function, ELPA Syncer, 2022/01/09