emacs-diffs
[Top][All Lists]
Advanced

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

master 00be23c: Don’t attempt to modify constant strings


From: Paul Eggert
Subject: master 00be23c: Don’t attempt to modify constant strings
Date: Sun, 17 May 2020 19:51:51 -0400 (EDT)

branch: master
commit 00be23c2af4aa1bb09afc6404c5ef68997dc18f5
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Don’t attempt to modify constant strings
    
    These attempts were found by ‘make compile-always’.
    * lisp/language/tibet-util.el (tibetan-obsolete-glyphs):
    * lisp/org/org-agenda.el (org-agenda-get-restriction-and-command):
    Don’t try to modify string constants.
---
 lisp/language/tibet-util.el | 14 +++++++++-----
 lisp/org/org-agenda.el      |  5 +++--
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/lisp/language/tibet-util.el b/lisp/language/tibet-util.el
index 29fff91..8684cdb 100644
--- a/lisp/language/tibet-util.el
+++ b/lisp/language/tibet-util.el
@@ -43,13 +43,17 @@
     ("་" . "་")
     ("༔" . "༔")
     ;; Yes these are dirty. But ...
-    ("༎ ༎" . ,(compose-string "༎ ༎" 0 3 [?༎ (Br . Bl) ?  (Br . Bl) ?༎]))
+    ("༎ ༎" . ,(compose-string (copy-sequence "༎ ༎")
+                             0 3 [?༎ (Br . Bl) ?  (Br . Bl) ?༎]))
     ("༄༅༅" . ,(compose-string
-                 "࿁࿂࿂࿂" 0 4
+                 (copy-sequence "࿁࿂࿂࿂") 0 4
                  [?࿁ (Br . Bl) ?࿂ (Br . Bl) ?࿂ (Br . Bl) ?࿂]))
-    ("༄༅" . ,(compose-string "࿁࿂࿂" 0 3 [?࿁ (Br . Bl) ?࿂ (Br . Bl) ?࿂]))
-    ("༆" . ,(compose-string "࿁࿂༙" 0 3 [?࿁ (Br . Bl) ?࿂ (br . tr) ?༙]))
-    ("༄"   . ,(compose-string "࿁࿂" 0 2 [?࿁ (Br . Bl) ?࿂]))))
+    ("༄༅" . ,(compose-string (copy-sequence "࿁࿂࿂")
+                            0 3 [?࿁ (Br . Bl) ?࿂ (Br . Bl) ?࿂]))
+    ("༆" . ,(compose-string (copy-sequence "࿁࿂༙")
+                           0 3 [?࿁ (Br . Bl) ?࿂ (br . tr) ?༙]))
+    ("༄"   . ,(compose-string (copy-sequence "࿁࿂")
+                             0 2 [?࿁ (Br . Bl) ?࿂]))))
 
 ;;;###autoload
 (defun tibetan-char-p (ch)
diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el
index 5fe140d..689d134 100644
--- a/lisp/org/org-agenda.el
+++ b/lisp/org/org-agenda.el
@@ -2995,7 +2995,8 @@ Agenda views are separated by 
`org-agenda-block-separator'."
        (erase-buffer)
        (insert (eval-when-compile
                  (let ((header
-                        "Press key for an agenda command:
+                        (copy-sequence
+                         "Press key for an agenda command:
 --------------------------------        <   Buffer, subtree/region restriction
 a   Agenda for current week or day      >   Remove restriction
 t   List of all TODO entries            e   Export agenda views
@@ -3004,7 +3005,7 @@ s   Search for keywords                 M   Like m, but 
only TODO entries
 /   Multi-occur                         S   Like s, but only TODO entries
 ?   Find :FLAGGED: entries              C   Configure custom agenda commands
 *   Toggle sticky agenda views          #   List stuck projects (!=configure)
-")
+"))
                        (start 0))
                    (while (string-match
                            "\\(^\\|   \\|(\\)\\(\\S-\\)\\( \\|=\\)"



reply via email to

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