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

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

[elpa] externals/transient 71687ba790 085/366: No longer allow character


From: Jonas Bernoulli
Subject: [elpa] externals/transient 71687ba790 085/366: No longer allow characters as pseudo suffixes
Date: Tue, 25 Jan 2022 18:54:29 -0500 (EST)

branch: externals/transient
commit 71687ba790dedffcb2527d4a37d6a3017149408c
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    No longer allow characters as pseudo suffixes
    
    The only potentially useful character were ?\n and ?\s but "" has the
    same effect as these two.  Unlike integers two `equal' strings are not
    also `eq', which means that attempting to remove an integer by
    position (to be implemented in subsequent commits) would always remove
    the first `eq' integer instead of the specified one.
---
 lisp/transient.el | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 7937cc065e..c44782f676 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -758,8 +758,7 @@ example, sets a variable use `define-infix-command' instead.
   (cl-etypecase spec
     (vector  (when-let ((c (transient--parse-group  prefix spec))) (list c)))
     (list    (when-let ((c (transient--parse-suffix prefix spec))) (list c)))
-    (string  (list spec))
-    (integer (list spec))))
+    (string  (list spec))))
 
 (defun transient--parse-group (prefix spec)
   (setq spec (append spec nil))
@@ -1443,7 +1442,6 @@ EDIT may be non-nil."
   (setq transient--suffixes
         (cl-labels ((s (def)
                        (cond
-                        ((integerp def) nil)
                         ((stringp def) nil)
                         ((listp def) (cl-mapcan #'s def))
                         ((transient-group--eieio-childp def)
@@ -1456,8 +1454,7 @@ EDIT may be non-nil."
   (cl-etypecase spec
     (vector  (transient--init-group  levels spec))
     (list    (transient--init-suffix levels spec))
-    (string  (list spec))
-    (integer (list spec))))
+    (string  (list spec))))
 
 (defun transient--init-group (levels spec)
   (pcase-let ((`(,level ,class ,args ,children) (append spec nil)))
@@ -2500,8 +2497,7 @@ have a history of their own.")
   (dolist (suffix (oref group suffixes))
     (let ((str (transient-format suffix)))
       (insert str)
-      (unless (or (integerp suffix)
-                  (string-match-p ".\n\\'" str))
+      (unless (string-match-p ".\n\\'" str)
         (insert ?\n)))))
 
 (cl-defmethod transient--insert-group ((group transient-columns))



reply via email to

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