Browse Source

Backport commit 00be23c2a from Emacs

* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
Don’t try to modify string constants.

Don’t attempt to modify constant strings
00be23c2af4aa1bb09afc6404c5ef68997dc18f5
Paul Eggert
Sun May 17 16:51:46 2020 -0700
Paul Eggert 1 month ago
parent
commit
1e3184964c
1 changed files with 3 additions and 2 deletions
  1. 3 2
      lisp/org-agenda.el

+ 3 - 2
lisp/org-agenda.el

@@ -3018,7 +3018,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
@@ -3027,7 +3028,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-\\)\\( \\|=\\)"