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

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

[elpa] externals/altcaps 5c52ae6f7c 01/10: Do not use vectors and charac


From: ELPA Syncer
Subject: [elpa] externals/altcaps 5c52ae6f7c 01/10: Do not use vectors and characters in altcaps-transform
Date: Fri, 22 Sep 2023 12:57:26 -0400 (EDT)

branch: externals/altcaps
commit 5c52ae6f7c2eeaeb23fe2866b61d06cd235c1402
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Do not use vectors and characters in altcaps-transform
---
 altcaps.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/altcaps.el b/altcaps.el
index c7185cc47b..2bc0c0f690 100644
--- a/altcaps.el
+++ b/altcaps.el
@@ -129,13 +129,13 @@ font that disambiguates characters.)"
 
 (defun altcaps-transform (string)
   "Make STRING use alternating letter casing, ignoring blanks."
-  (let ((s (vconcat (downcase string)))
+  (let ((s (split-string (downcase string) ""))
         casing
         chars)
     (mapc (lambda (c)
-            (when (string-match-p "[[:alpha:]]" (char-to-string c))
+            (when (string-match-p "[[:alpha:]]" c)
               (cond
-               ((when-let ((force-case (alist-get c 
altcaps-force-character-casing)))
+               ((when-let ((force-case (alist-get c 
altcaps-force-character-casing nil nil #'equal)))
                   (setq c (funcall force-case c)
                         casing force-case)))
                ((eq casing 'downcase)
@@ -146,7 +146,7 @@ font that disambiguates characters.)"
                       casing 'downcase))))
             (push c chars))
           s)
-    (concat (reverse chars))))
+    (apply #'concat (nreverse chars))))
 
 (defun altcaps-replace (string &optional start)
   "Convert STRING in buffer to alternating letter casing.



reply via email to

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