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

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

[elpa] externals/org 546f2d86d1 07/10: org-add-prop-inherited: Avoid mod


From: ELPA Syncer
Subject: [elpa] externals/org 546f2d86d1 07/10: org-add-prop-inherited: Avoid modifying S
Date: Sun, 14 May 2023 08:58:56 -0400 (EDT)

branch: externals/org
commit 546f2d86d14cf10ddfa6da4f57f583377d6b24da
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>

    org-add-prop-inherited: Avoid modifying S
    
    * lisp/org.el (org-add-prop-inherited): Do not modify argument by side
    effect.  Modifying strings may cause unexpected issues when working
    with constant strings.
    
    Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=62847
---
 lisp/org.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 542959f730..497baa8507 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11588,8 +11588,7 @@ the list of tags in this group."
 (delete-overlay org-tags-overlay)
 
 (defun org-add-prop-inherited (s)
-  (add-text-properties 0 (length s) '(inherited t) s)
-  s)
+  (propertize s 'inherited t))
 
 (defun org-toggle-tag (tag &optional onoff)
   "Toggle the tag TAG for the current line.



reply via email to

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