emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/cape 4589365f37 1/5: Add cape-emoji on Emacs 28 and new


From: ELPA Syncer
Subject: [elpa] externals/cape 4589365f37 1/5: Add cape-emoji on Emacs 28 and newer (See #90)
Date: Sun, 10 Sep 2023 03:57:26 -0400 (EDT)

branch: externals/cape
commit 4589365f3786aff8c23e5ccb5de1af08990a3e28
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Add cape-emoji on Emacs 28 and newer (See #90)
---
 CHANGELOG.org |  4 +++-
 cape-char.el  | 15 +++++++++++++--
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 3f45ca187b..4113302adc 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -4,7 +4,9 @@
 
 * Development
 
-- Add =cape-wrap-debug= and =cape-capf-debug= to add debug messages to a Capf.
+- =cape-emoji=: New Capf available on Emacs 28 and newer.
+- =cape-wrap-debug=, =cape-capf-debug=: New Capf transformers to add debug 
messages
+  to a Capf.
 - Rename =cape-super-capf= to =cape-capf-super=. Add =cape-wrap-super= for 
consistency
   with other Capf combinators.
 - Rename =cape-symbol= to =cape-elisp-symbol=.
diff --git a/cape-char.el b/cape-char.el
index b7eb3675b2..d8571d7777 100644
--- a/cape-char.el
+++ b/cape-char.el
@@ -130,12 +130,23 @@ is nil the function acts like a capf." method method)
                     (cape--table-with-properties ,hash :category ',capf))
               ,properties)))))))
 
+;; TODO: use static-if as soon as compat-30 is released
+(defmacro cape--static-if (cond then &rest else)
+  "Static if COND with THEN and ELSE branch."
+  (if (eval cond t) then (cons 'progn else)))
+
 ;;;###autoload (autoload 'cape-tex "cape-char" nil t)
-;;;###autoload (autoload 'cape-sgml "cape-char" nil t)
-;;;###autoload (autoload 'cape-rfc1345 "cape-char" nil t)
 (cape-char--define tex "TeX" ?\\ ?^ ?_)
+
+;;;###autoload (autoload 'cape-sgml "cape-char" nil t)
 (cape-char--define sgml "sgml" ?&)
+
+;;;###autoload (autoload 'cape-rfc1345 "cape-char" nil t)
 (cape-char--define rfc1345 "rfc1345" ?&)
 
+;;;###autoload (when (> emacs-major-version 28) (autoload 'cape-emoji 
"cape-char" nil t))
+(cape--static-if (> emacs-major-version 28)
+  (cape-char--define emoji "emoji" ?:))
+
 (provide 'cape-char)
 ;;; cape-char.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]