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

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

[nongnu] elpa/annotate 3b871f10f9 290/372: - prevented side effects of '


From: ELPA Syncer
Subject: [nongnu] elpa/annotate 3b871f10f9 290/372: - prevented side effects of 'split-string'
Date: Fri, 4 Feb 2022 16:59:09 -0500 (EST)

branch: elpa/annotate
commit 3b871f10f90d9c1461c02164e89d6d77883337ce
Author: cage <cage-invalid@invalid>
Commit: cage <cage-invalid@invalid>

    - prevented side effects of 'split-string'
    
    I  think  i  have added  this  bug  many  months  ago and  was  hiding
    unnoticed! :) It  was discovered by chance only because  of the latest
    code changes related to multi-line annotated text.
---
 annotate.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/annotate.el b/annotate.el
index c0a88bd091..6328fd5052 100644
--- a/annotate.el
+++ b/annotate.el
@@ -920,10 +920,12 @@ to 'maximum-width'."
                           (%group (append (list suffix)
                                           (cl-rest rest-words))
                                   (append (list prefix)
-                                          so-far)))))))
+                                          so-far))))))
+              (%split-words (text)
+                (save-match-data (split-string text " " t))))
     (if (< maximum-width 1)
         nil
-      (let* ((words   (split-string text " " t))
+      (let* ((words   (%split-words text))
              (grouped (reverse (%group words '()))))
         grouped))))
 



reply via email to

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