summaryrefslogtreecommitdiff
path: root/cape-char.el
AgeCommit message (Collapse)Author
2026-01-04Use when-let*Daniel Mendler
2026-01-01; Update copyright yearsDaniel Mendler
2025-09-20Require Emacs 29Daniel Mendler
2025-01-16Better emoji normalization (Fix #143)Daniel Mendler
2025-01-01Update copyright yearsDaniel Mendler
2024-12-11Remove cape--properties-table, move sort settings to *-propertiesDaniel Mendler
2024-11-05cape-char: Add space to the annotation to avoid truncationDaniel Mendler
2024-02-24cape-char: Use looking-back, look back from pointDaniel Mendler
Fix minad/corfu#423
2024-01-02Fix docstringDaniel Mendler
2024-01-02Bump copyright yearsDaniel Mendler
2023-10-29Rename internal function for consistencyDaniel Mendler
2023-09-28cape-char: RefactoringDaniel Mendler
- Minor cleanup - cape-char--translation: Take prefix keys as argument instead of regexp - Add eval-and-compile, such that function is available at compile-/runtime - Extract annotation, docsig and exit function - Improve docsig function for combined characters
2023-09-28char: `*--define` macro: Call translation-hash from within the macrohedy
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.
2023-09-28char: Remove `eval-when-compile` on translation-hash functionhedy
Also note that the purity declaration is also removed. Suggested from PR review comments. > If we remove that, which is possible because of your vastly simpler > implementation, the macro can be used, which is a significant > improvement over the status quo The reason for the change in this commit is because of the improved implementation for the translation-hash function (several commits ago).
2023-09-28char: Make `*--ensure-*` functions inlinehedy
...so resulting byte code is simpler, as suggested by minad in PR review.
2023-09-28char: Define `*--ensure-*` functions as macroshedy
This fixes the void-function errors. Efficiency wise IMO it's pretty much on par with the function implementation. But when the current translation function having `eval-when-compile` around it, this suppresses the cape-char--translation-hash symbol definition is void errors. There are possibly more targeted fixes to this problem, and we'll probably be changing the `eval-when-compile` in the future anyway, but I think this change isn't really a "hack" to fix it -- just an alternate solution for `*--ensure-*` functions (macros).
2023-09-28char: Suppress reference to free variable warninghedy
2023-09-28char: Refactor translation hash functionhedy
- Rather than putting details on the hash contents as comments, put them in the docstring so the user of the function can see it without viewing source - Call `quail-use-package` before the let block since it doesn't rely on the variables bound in let - No need to set `quail-current-package` ourselves - map-list (previously bound in let) is only used once, so now it's put inline in quail-build-decode-map call - Formatting refactors
2023-09-28char: More inclusive on the matching translations to includehedy
Note that this is not an atomic commit :') - Previously filtered out translations that are stored as a vector but with only one element. Now those are included with that element as the translation. - Some translations (particularly emoji of country flags) cannot preserve their string when converted to char then back to string. For cases like these they are now stored as strings in the hash table. All other translations are still stored as chars (to save space in storing the hash). One can possibly use (= (string-width value-str) 2) to check, but some strings that satisfy this condition also satisfy string-char reversability, so the naive (string= (char-to-string value-char) value-str) is used. This directly allows for completing emoji country flags. I did not look into any other benefits of this regarding other input methods. Because of this change, new helper functions cape-char --ensure-str and --ensure-char are introduced to ace clarity when updating cape-char--define. - Moved (require 'quail) into the translation function. (resolves review comment) - Better doc string and naming of translation function: This clarifies from the function name that a hash is returned -- better for when the function becomes a public API. - Reverted removing regexp argument from translation function. This allows filtering out name-value translation pairs from the hash that do not match the required prefixes. Waste of space to keep those translations around in the hash. (resolves review comment)
2023-09-28char: Better implementation of obtaining input method translation hashhedy
This uses quail functions to obtain the hash rather than parsing the output of describe-input-method, which makes it more stable since relying on emacs library data structures is better than relying on help output formats.
2023-09-14cape-char--static-if: Fix naming conventionDaniel Mendler
2023-09-10cape-char: Update commentaryDaniel Mendler
2023-09-10Improve docstringsDaniel Mendler
2023-09-10Add cape-emoji on Emacs 28 and newer (See #90)Daniel Mendler
2023-05-29cape-dabbrev: Respect dabbrev-abbrev-char-regexpDaniel Mendler
2023-01-27Fix last commitDaniel Mendler
2023-01-13Require the compat libraryDaniel Mendler
2023-01-12cape-tex: Do not insert backslash when already looking at \phi (Fix #71)Daniel Mendler
2023-01-01Update copyrightDaniel Mendler
2023-01-01Update copyrightDaniel Mendler
2022-10-11Update linksDaniel Mendler
2022-04-29No exclusive Capf exclusivity treatment for cape-char and cape-keyword!Daniel Mendler
2022-04-14Move some of the heavier, rarely used Capfs to separate filesDaniel Mendler