summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2023-05-17 10:56:44 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2023-05-17 11:00:25 +0200
commit670174a6d5f7856df523505f8fb8fc90388de47f (patch)
tree6b54ca4c904981f3195ea4d8e532aa25c6df56ec
parent6cb963b73c3768958e13e96b2534d1e99239a3ff (diff)
downloademacs-670174a6d5f7856df523505f8fb8fc90388de47f.tar.gz
Eliminate some mutation of program constants
* lisp/foldout.el: * lisp/gnus/mml2015.el (mml2015-epg-key-image-to-string): * lisp/international/ja-dic-cnv.el (skkdic-set-postfix) (skkdic-set-prefix): * lisp/international/quail.el (quail-insert-kbd-layout): * lisp/mail/rmail.el (rmail-set-attribute-1): * lisp/net/tramp.el (tramp-handle-memory-info): * lisp/org/org-macs.el (org-replace-escapes): Work on newly created objects, or use non-destructive operations.
-rw-r--r--lisp/foldout.el2
-rw-r--r--lisp/gnus/mml2015.el2
-rw-r--r--lisp/international/ja-dic-cnv.el4
-rw-r--r--lisp/international/quail.el3
-rw-r--r--lisp/mail/rmail.el2
-rw-r--r--lisp/net/tramp.el2
-rw-r--r--lisp/org/org-macs.el2
7 files changed, 8 insertions, 9 deletions
diff --git a/lisp/foldout.el b/lisp/foldout.el
index 5a3afc9508a..ace242ffbc7 100644
--- a/lisp/foldout.el
+++ b/lisp/foldout.el
@@ -229,7 +229,7 @@ An end marker of nil means the fold ends after (point-max).")
(error "Can't find outline-minor-mode in minor-mode-alist"))
;; slip our fold announcement into the list
- (setcdr outl-entry (nconc foldout-entry (cdr outl-entry)))))
+ (setcdr outl-entry (append foldout-entry (cdr outl-entry)))))
diff --git a/lisp/gnus/mml2015.el b/lisp/gnus/mml2015.el
index b8dd61de3b9..21bb46b8fa7 100644
--- a/lisp/gnus/mml2015.el
+++ b/lisp/gnus/mml2015.el
@@ -752,7 +752,7 @@ If set, it overrides the setting of `mml2015-sign-with-sender'."
(if (not key-image)
""
(condition-case nil
- (let ((result " "))
+ (let ((result (copy-sequence " ")))
(put-text-property
1 2 'display
(gnus-rescale-image key-image
diff --git a/lisp/international/ja-dic-cnv.el b/lisp/international/ja-dic-cnv.el
index 9ce31f11d91..5477473ae8c 100644
--- a/lisp/international/ja-dic-cnv.el
+++ b/lisp/international/ja-dic-cnv.el
@@ -484,7 +484,7 @@ To get complete usage, invoke:
(defmacro skkdic-set-postfix (&rest entries)
`(defconst skkdic-postfix
',(let ((l entries)
- (map '(nil))
+ (map (list nil))
(longest 1)
len entry)
(while l
@@ -507,7 +507,7 @@ To get complete usage, invoke:
(defmacro skkdic-set-prefix (&rest entries)
`(defconst skkdic-prefix
',(let ((l entries)
- (map '(nil))
+ (map (list nil))
(longest 1)
len entry)
(while l
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 317ea8495de..894378bda8b 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -804,13 +804,12 @@ The format of KBD-LAYOUT is the same as `quail-keyboard-layout'."
(setq i (1+ i)))
(let ((pos (point))
- (bar "|")
+ (bar (propertize "|" 'face 'bold))
lower upper row)
;; Make table without horizontal lines. Each column for a key
;; has the form "| LU |" where L is for lower key and U is
;; for a upper key. If width of L (U) is greater than 1,
;; preceding (following) space is not inserted.
- (put-text-property 0 1 'face 'bold bar)
(setq i 0)
(while (< i quail-keyboard-layout-len)
(when (= (% i 30) 0)
diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index c56f4ce62dc..d07a1fda901 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -2285,7 +2285,7 @@ significant attribute change was made."
(insert value)))
;; Otherwise add a header line to record the attributes and set
;; all but this one to no.
- (let ((header-value "--------"))
+ (let ((header-value (copy-sequence "--------")))
(aset header-value attr value)
(goto-char (if limit (1- limit) (point-max)))
(setq altered (/= value ?-))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 3eb2dd13cbc..910d534330c 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -5142,7 +5142,7 @@ support symbolic links."
(defun tramp-handle-memory-info ()
"Like `memory-info' for Tramp files."
- (let ((result '(0 0 0 0))
+ (let ((result (list 0 0 0 0))
process-file-side-effects)
(with-temp-buffer
(cond
diff --git a/lisp/org/org-macs.el b/lisp/org/org-macs.el
index 1552675f8a8..4efa8ba6800 100644
--- a/lisp/org/org-macs.el
+++ b/lisp/org/org-macs.el
@@ -1288,7 +1288,7 @@ so values can contain further %-escapes if they are define later in TABLE."
(setq re (concat "%-?[0-9.]*" (substring (car e) 1)))
(when (and (cdr e) (string-match re (cdr e)))
(let ((sref (substring (cdr e) (match-beginning 0) (match-end 0)))
- (safe "SREF"))
+ (safe (copy-sequence "SREF")))
(add-text-properties 0 3 (list 'sref sref) safe)
(setcdr e (replace-match safe t t (cdr e)))))
(while (string-match re string)