summaryrefslogtreecommitdiff
path: root/admin/charsets/eucjp-ms.awk
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-05-16 17:04:15 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2020-05-16 17:05:37 -0700
commitc7bc28bf038e08fcc03e5dc96cd762af06b34e09 (patch)
tree378ddd85e5549bddeb5642314c8ac1627743e324 /admin/charsets/eucjp-ms.awk
parenta6ebca21b349ccfffdc0d4b84578d4c7a0f3ee22 (diff)
downloademacs-c7bc28bf038e08fcc03e5dc96cd762af06b34e09.tar.gz
Don’t attempt to modify constant conses
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.
Diffstat (limited to 'admin/charsets/eucjp-ms.awk')
-rw-r--r--admin/charsets/eucjp-ms.awk14
1 files changed, 8 insertions, 6 deletions
diff --git a/admin/charsets/eucjp-ms.awk b/admin/charsets/eucjp-ms.awk
index 0c9f94d0f48..f6a6748ce51 100644
--- a/admin/charsets/eucjp-ms.awk
+++ b/admin/charsets/eucjp-ms.awk
@@ -93,15 +93,17 @@ function write_entry (unicode) {
END {
print ")))";
- print " (mapc #'(lambda (x)";
+ print " (setq map";
+ print " (mapcar";
+ print " (lambda (x)";
print " (let ((code (logand (car x) #x7F7F)))";
print " (if (integerp (cdr x))";
- print " (setcar x (decode-char 'japanese-jisx0208 code))";
- print " (setcar x (decode-char 'japanese-jisx0212 code))";
- print " (setcdr x (cadr x)))))";
- print " map)";
+ print " (cons (decode-char 'japanese-jisx0208 code) (cdr x))";
+ print " (cons (decode-char 'japanese-jisx0212 code)"
+ print " (cadr x)))))";
+ print " map))";
print " (define-translation-table 'eucjp-ms-decode map)";
- print " (mapc #'(lambda (x)";
+ print " (mapc (lambda (x)";
print " (let ((tmp (car x)))";
print " (setcar x (cdr x)) (setcdr x tmp)))";
print " map)";