From c7bc28bf038e08fcc03e5dc96cd762af06b34e09 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 16 May 2020 17:04:15 -0700 Subject: Don’t attempt to modify constant conses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From a patch privately suggested by Mattias Engdegård on 2020-05-11 in a followup to Bug#40671. * admin/charsets/cp51932.awk: * admin/charsets/eucjp-ms.awk: Generate code that does not modify constant conses. * doc/misc/emacs-mime.texi (Encoding Customization): * lisp/emacs-lisp/byte-opt.el (byte-compile-side-effect-free-ops): * lisp/frameset.el (frameset-persistent-filter-alist): * lisp/gnus/gnus-sum.el (gnus-article-mode-line-format-alist): Use append instead of nconc. * lisp/language/japanese.el (japanese-ucs-cp932-to-jis-map) (jisx0213-to-unicode): Use mapcar instead of mapc. * lisp/language/lao-util.el (lao-transcription-consonant-alist) (lao-transcription-vowel-alist): * lisp/language/tibetan.el (tibetan-subjoined-transcription-alist): Use copy-sequence. * test/src/fns-tests.el (fns-tests-nreverse): (fns-tests-sort, fns-tests-collate-sort) (fns-tests-string-version-lessp, fns-tests-mapcan): Use copy-sequence, vector, and list. --- lisp/emacs-lisp/byte-opt.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 4f72251aed5..62b82e4f32a 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -1509,7 +1509,7 @@ byte-current-buffer byte-stack-ref)) (defconst byte-compile-side-effect-free-ops - (nconc + (append '(byte-varref byte-nth byte-memq byte-car byte-cdr byte-length byte-aref byte-symbol-value byte-get byte-concat2 byte-concat3 byte-sub1 byte-add1 byte-eqlsign byte-gtr byte-lss byte-leq byte-geq byte-diff byte-negate -- cgit v1.2.3