[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/cape 4b8f101dfb 8/9: char: `*--define` macro: Call tran
From: |
ELPA Syncer |
Subject: |
[elpa] externals/cape 4b8f101dfb 8/9: char: `*--define` macro: Call translation-hash from within the macro |
Date: |
Thu, 28 Sep 2023 00:57:47 -0400 (EDT) |
branch: externals/cape
commit 4b8f101dfb0ef4f1ac418f2170b268565310e0e0
Author: hedy <hedy@tilde.cafe>
Commit: Daniel Mendler <mail@daniel-mendler.de>
char: `*--define` macro: Call translation-hash from within the macro
This lets the translation hash to be computed within the macro rather
than after the macro is expanded.
I kept the name `hash` for the variable symbol to conform to the style
of the other macro variables/functions in let.
---
cape-char.el | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/cape-char.el b/cape-char.el
index a5c32f8228..cd11dc2101 100644
--- a/cape-char.el
+++ b/cape-char.el
@@ -72,11 +72,12 @@ PREFIX are the prefix characters."
(docsig (intern (format "cape--%s-docsig" name)))
(exit (intern (format "cape--%s-exit" name)))
(properties (intern (format "cape--%s-properties" name)))
- (thing-re (concat (regexp-opt (mapcar #'char-to-string prefix)) "[^
\n\t]*" )))
+ (thing-re (concat (regexp-opt (mapcar #'char-to-string prefix)) "[^
\n\t]*" ))
+ (hash-val (cape-char--translation-hash
+ method
+ (concat "\\`" (regexp-opt (mapcar #'char-to-string
prefix))))))
`(progn
- (defvar ,hash (cape-char--translation-hash
- ,method
- ,(concat "\\`" (regexp-opt (mapcar #'char-to-string
prefix)))))
+ (defvar ,hash ,hash-val)
(defcustom ,prefix-required t
,(format "Initial prefix is required for `%s' to trigger." capf)
:type 'boolean
- [elpa] externals/cape updated (4506ee8212 -> f97e64e870), ELPA Syncer, 2023/09/28
- [elpa] externals/cape f89307f9fe 1/9: char: Better implementation of obtaining input method translation hash, ELPA Syncer, 2023/09/28
- [elpa] externals/cape 0f4b94109a 2/9: char: More inclusive on the matching translations to include, ELPA Syncer, 2023/09/28
- [elpa] externals/cape d25df039f8 3/9: char: Refactor translation hash function, ELPA Syncer, 2023/09/28
- [elpa] externals/cape b06ee58fd6 4/9: char: Suppress reference to free variable warning, ELPA Syncer, 2023/09/28
- [elpa] externals/cape 3f4afc695c 6/9: char: Make `*--ensure-*` functions inline, ELPA Syncer, 2023/09/28
- [elpa] externals/cape 4b8f101dfb 8/9: char: `*--define` macro: Call translation-hash from within the macro,
ELPA Syncer <=
- [elpa] externals/cape 29beb6a1c7 5/9: char: Define `*--ensure-*` functions as macros, ELPA Syncer, 2023/09/28
- [elpa] externals/cape 03d8c56c93 7/9: char: Remove `eval-when-compile` on translation-hash function, ELPA Syncer, 2023/09/28
- [elpa] externals/cape f97e64e870 9/9: cape-char: Refactoring, ELPA Syncer, 2023/09/28