aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/charsets/cp51932.awk13
-rw-r--r--admin/charsets/eucjp-ms.awk14
-rw-r--r--doc/misc/emacs-mime.texi2
-rw-r--r--lisp/emacs-lisp/byte-opt.el2
-rw-r--r--lisp/frameset.el12
-rw-r--r--lisp/gnus/gnus-sum.el6
-rw-r--r--lisp/language/japanese.el10
-rw-r--r--lisp/language/lao-util.el16
-rw-r--r--lisp/language/tibetan.el8
-rw-r--r--test/src/fns-tests.el34
10 files changed, 63 insertions, 54 deletions
diff --git a/admin/charsets/cp51932.awk b/admin/charsets/cp51932.awk
index 6aac98815b5..c3555095249 100644
--- a/admin/charsets/cp51932.awk
+++ b/admin/charsets/cp51932.awk
@@ -43,13 +43,14 @@ BEGIN {
43 43
44END { 44END {
45 print ")))"; 45 print ")))";
46 print " (mapc #'(lambda (x)"; 46 print " (setq map (mapcar (lambda (x)";
47 print " (setcar x (decode-char 'japanese-jisx0208 (car x))))"; 47 print " (cons (decode-char 'japanese-jisx0208 (car x))";
48 print " map)"; 48 print " (cdr x)))";
49 print " map))";
49 print " (define-translation-table 'cp51932-decode map)"; 50 print " (define-translation-table 'cp51932-decode map)";
50 print " (mapc #'(lambda (x)"; 51 print " (mapc (lambda (x)";
51 print " (let ((tmp (car x)))"; 52 print " (let ((tmp (car x)))";
52 print " (setcar x (cdr x)) (setcdr x tmp)))"; 53 print " (setcar x (cdr x)) (setcdr x tmp)))";
53 print " map)"; 54 print " map)";
54 print " (define-translation-table 'cp51932-encode map))"; 55 print " (define-translation-table 'cp51932-encode map))";
55 print ""; 56 print "";
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) {
93 93
94END { 94END {
95 print ")))"; 95 print ")))";
96 print " (mapc #'(lambda (x)"; 96 print " (setq map";
97 print " (mapcar";
98 print " (lambda (x)";
97 print " (let ((code (logand (car x) #x7F7F)))"; 99 print " (let ((code (logand (car x) #x7F7F)))";
98 print " (if (integerp (cdr x))"; 100 print " (if (integerp (cdr x))";
99 print " (setcar x (decode-char 'japanese-jisx0208 code))"; 101 print " (cons (decode-char 'japanese-jisx0208 code) (cdr x))";
100 print " (setcar x (decode-char 'japanese-jisx0212 code))"; 102 print " (cons (decode-char 'japanese-jisx0212 code)"
101 print " (setcdr x (cadr x)))))"; 103 print " (cadr x)))))";
102 print " map)"; 104 print " map))";
103 print " (define-translation-table 'eucjp-ms-decode map)"; 105 print " (define-translation-table 'eucjp-ms-decode map)";
104 print " (mapc #'(lambda (x)"; 106 print " (mapc (lambda (x)";
105 print " (let ((tmp (car x)))"; 107 print " (let ((tmp (car x)))";
106 print " (setcar x (cdr x)) (setcdr x tmp)))"; 108 print " (setcar x (cdr x)) (setcdr x tmp)))";
107 print " map)"; 109 print " map)";
diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi
index 42a7750b9ac..2f38dcd4956 100644
--- a/doc/misc/emacs-mime.texi
+++ b/doc/misc/emacs-mime.texi
@@ -917,7 +917,7 @@ Here's an example:
917@lisp 917@lisp
918(add-to-list 'gnus-newsgroup-variables 'mm-coding-system-priorities) 918(add-to-list 'gnus-newsgroup-variables 'mm-coding-system-priorities)
919(setq gnus-parameters 919(setq gnus-parameters
920 (nconc 920 (append
921 ;; Some charsets are just examples! 921 ;; Some charsets are just examples!
922 '(("^cn\\." ;; Chinese 922 '(("^cn\\." ;; Chinese
923 (mm-coding-system-priorities 923 (mm-coding-system-priorities
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 @@
1509 byte-current-buffer byte-stack-ref)) 1509 byte-current-buffer byte-stack-ref))
1510 1510
1511(defconst byte-compile-side-effect-free-ops 1511(defconst byte-compile-side-effect-free-ops
1512 (nconc 1512 (append
1513 '(byte-varref byte-nth byte-memq byte-car byte-cdr byte-length byte-aref 1513 '(byte-varref byte-nth byte-memq byte-car byte-cdr byte-length byte-aref
1514 byte-symbol-value byte-get byte-concat2 byte-concat3 byte-sub1 byte-add1 1514 byte-symbol-value byte-get byte-concat2 byte-concat3 byte-sub1 byte-add1
1515 byte-eqlsign byte-gtr byte-lss byte-leq byte-geq byte-diff byte-negate 1515 byte-eqlsign byte-gtr byte-lss byte-leq byte-geq byte-diff byte-negate
diff --git a/lisp/frameset.el b/lisp/frameset.el
index 10c6914f52d..0462d776c0e 100644
--- a/lisp/frameset.el
+++ b/lisp/frameset.el
@@ -396,17 +396,17 @@ Properties can be set with
396;; or, if you're only changing a few items, 396;; or, if you're only changing a few items,
397;; 397;;
398;; (defvar my-filter-alist 398;; (defvar my-filter-alist
399;; (nconc '((my-param1 . :never) 399;; (append '((my-param1 . :never)
400;; (my-param2 . my-filtering-function)) 400;; (my-param2 . my-filtering-function))
401;; frameset-filter-alist) 401;; frameset-filter-alist)
402;; "My brief customized parameter filter alist.") 402;; "My brief customized parameter filter alist.")
403;; 403;;
404;; and pass it to the FILTER arg of the save/restore functions, 404;; and pass it to the FILTER arg of the save/restore functions,
405;; ALWAYS taking care of not modifying the original lists; if you're 405;; ALWAYS taking care of not modifying the original lists; if you're
406;; going to do any modifying of my-filter-alist, please use 406;; going to do any modifying of my-filter-alist, please use
407;; 407;;
408;; (nconc '((my-param1 . :never) ...) 408;; (append '((my-param1 . :never) ...)
409;; (copy-sequence frameset-filter-alist)) 409;; (copy-sequence frameset-filter-alist))
410;; 410;;
411;; One thing you shouldn't forget is that they are alists, so searching 411;; One thing you shouldn't forget is that they are alists, so searching
412;; in them is sequential. If you just want to change the default of 412;; in them is sequential. If you just want to change the default of
@@ -445,7 +445,7 @@ DO NOT MODIFY. See `frameset-filter-alist' for a full description.")
445 445
446;;;###autoload 446;;;###autoload
447(defvar frameset-persistent-filter-alist 447(defvar frameset-persistent-filter-alist
448 (nconc 448 (append
449 '((background-color . frameset-filter-sanitize-color) 449 '((background-color . frameset-filter-sanitize-color)
450 (buffer-list . :never) 450 (buffer-list . :never)
451 (buffer-predicate . :never) 451 (buffer-predicate . :never)
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 6f367692ddd..341f04ad772 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -1501,9 +1501,9 @@ the type of the variable (string, integer, character, etc).")
1501 1501
1502;; This is here rather than in gnus-art for compilation reasons. 1502;; This is here rather than in gnus-art for compilation reasons.
1503(defvar gnus-article-mode-line-format-alist 1503(defvar gnus-article-mode-line-format-alist
1504 (nconc '((?w (gnus-article-wash-status) ?s) 1504 (append '((?w (gnus-article-wash-status) ?s)
1505 (?m (gnus-article-mime-part-status) ?s)) 1505 (?m (gnus-article-mime-part-status) ?s))
1506 gnus-summary-mode-line-format-alist)) 1506 gnus-summary-mode-line-format-alist))
1507 1507
1508(defvar gnus-last-search-regexp nil 1508(defvar gnus-last-search-regexp nil
1509 "Default regexp for article search command.") 1509 "Default regexp for article search command.")
diff --git a/lisp/language/japanese.el b/lisp/language/japanese.el
index d77efa48c9b..9a99245dfde 100644
--- a/lisp/language/japanese.el
+++ b/lisp/language/japanese.el
@@ -82,9 +82,7 @@
82 (#x00A6 . #xFFE4) ; BROKEN LINE FULLWIDTH BROKEN LINE 82 (#x00A6 . #xFFE4) ; BROKEN LINE FULLWIDTH BROKEN LINE
83 ))) 83 )))
84 (define-translation-table 'japanese-ucs-jis-to-cp932-map map) 84 (define-translation-table 'japanese-ucs-jis-to-cp932-map map)
85 (mapc #'(lambda (x) (let ((tmp (car x))) 85 (setq map (mapcar (lambda (x) (cons (cdr x) (car x))) map))
86 (setcar x (cdr x)) (setcdr x tmp)))
87 map)
88 (define-translation-table 'japanese-ucs-cp932-to-jis-map map)) 86 (define-translation-table 'japanese-ucs-cp932-to-jis-map map))
89 87
90;; U+2014 (EM DASH) vs U+2015 (HORIZONTAL BAR) 88;; U+2014 (EM DASH) vs U+2015 (HORIZONTAL BAR)
@@ -241,8 +239,10 @@ eucJP-ms is defined in <http://www.opengroup.or.jp/jvc/cde/appendix.html>."
241 (#x2b65 . [#x02E9 #x02E5]) 239 (#x2b65 . [#x02E9 #x02E5])
242 (#x2b66 . [#x02E5 #x02E9]))) 240 (#x2b66 . [#x02E5 #x02E9])))
243 table) 241 table)
244 (dolist (elt map) 242 (setq map
245 (setcar elt (decode-char 'japanese-jisx0213-1 (car elt)))) 243 (mapcar (lambda (x) (cons (decode-char 'japanese-jisx0213-1 (car x))
244 (cdr x)))
245 map))
246 (setq table (make-translation-table-from-alist map)) 246 (setq table (make-translation-table-from-alist map))
247 (define-translation-table 'jisx0213-to-unicode table) 247 (define-translation-table 'jisx0213-to-unicode table)
248 (define-translation-table 'unicode-to-jisx0213 248 (define-translation-table 'unicode-to-jisx0213
diff --git a/lisp/language/lao-util.el b/lisp/language/lao-util.el
index a20aecee421..fa4c2f7f891 100644
--- a/lisp/language/lao-util.el
+++ b/lisp/language/lao-util.el
@@ -183,7 +183,9 @@
183;; Semi-vowel-sign-lo and lower vowels are put under the letter. 183;; Semi-vowel-sign-lo and lower vowels are put under the letter.
184 184
185(defconst lao-transcription-consonant-alist 185(defconst lao-transcription-consonant-alist
186 (sort '(;; single consonants 186 (sort
187 (copy-sequence
188 '(;; single consonants
187 ("k" . "ກ") 189 ("k" . "ກ")
188 ("kh" . "ຂ") 190 ("kh" . "ຂ")
189 ("qh" . "ຄ") 191 ("qh" . "ຄ")
@@ -223,14 +225,16 @@
223 ("hy" . ["ຫຍ"]) 225 ("hy" . ["ຫຍ"])
224 ("hn" . ["ຫນ"]) 226 ("hn" . ["ຫນ"])
225 ("hm" . ["ຫມ"]) 227 ("hm" . ["ຫມ"])
226 ) 228 ))
227 (function (lambda (x y) (> (length (car x)) (length (car y))))))) 229 (lambda (x y) (> (length (car x)) (length (car y))))))
228 230
229(defconst lao-transcription-semi-vowel-alist 231(defconst lao-transcription-semi-vowel-alist
230 '(("r" . "ຼ"))) 232 '(("r" . "ຼ")))
231 233
232(defconst lao-transcription-vowel-alist 234(defconst lao-transcription-vowel-alist
233 (sort '(("a" . "ະ") 235 (sort
236 (copy-sequence
237 '(("a" . "ະ")
234 ("ar" . "າ") 238 ("ar" . "າ")
235 ("i" . "ິ") 239 ("i" . "ິ")
236 ("ii" . "ີ") 240 ("ii" . "ີ")
@@ -257,8 +261,8 @@
257 ("ai" . "ໄ") 261 ("ai" . "ໄ")
258 ("ei" . "ໃ") 262 ("ei" . "ໃ")
259 ("ao" . ["ເົາ"]) 263 ("ao" . ["ເົາ"])
260 ("aM" . "ຳ")) 264 ("aM" . "ຳ")))
261 (function (lambda (x y) (> (length (car x)) (length (car y))))))) 265 (lambda (x y) (> (length (car x)) (length (car y))))))
262 266
263;; Maa-sakod is put at the tail. 267;; Maa-sakod is put at the tail.
264(defconst lao-transcription-maa-sakod-alist 268(defconst lao-transcription-maa-sakod-alist
diff --git a/lisp/language/tibetan.el b/lisp/language/tibetan.el
index d31cd5cd528..bbd4729f6c5 100644
--- a/lisp/language/tibetan.el
+++ b/lisp/language/tibetan.el
@@ -326,7 +326,9 @@
326 326
327 327
328(defconst tibetan-subjoined-transcription-alist 328(defconst tibetan-subjoined-transcription-alist
329 (sort '(("+k" . "ྐ") 329 (sort
330 (copy-sequence
331 '(("+k" . "ྐ")
330 ("+kh" . "ྑ") 332 ("+kh" . "ྑ")
331 ("+g" . "ྒ") 333 ("+g" . "ྒ")
332 ("+gh" . "ྒྷ") 334 ("+gh" . "ྒྷ")
@@ -371,8 +373,8 @@
371 ("+W" . "ྺ") ;; fixed form subscribed WA 373 ("+W" . "ྺ") ;; fixed form subscribed WA
372 ("+Y" . "ྻ") ;; fixed form subscribed YA 374 ("+Y" . "ྻ") ;; fixed form subscribed YA
373 ("+R" . "ྼ") ;; fixed form subscribed RA 375 ("+R" . "ྼ") ;; fixed form subscribed RA
374 ) 376 ))
375 (lambda (x y) (> (length (car x)) (length (car y)))))) 377 (lambda (x y) (> (length (car x)) (length (car y))))))
376 378
377;;; 379;;;
378;;; alist for Tibetan base consonant <-> subjoined consonant conversion. 380;;; alist for Tibetan base consonant <-> subjoined consonant conversion.
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el
index c6ceae4a00e..b65543a64b5 100644
--- a/test/src/fns-tests.el
+++ b/test/src/fns-tests.el
@@ -49,21 +49,21 @@
49 (should-error (nreverse)) 49 (should-error (nreverse))
50 (should-error (nreverse 1)) 50 (should-error (nreverse 1))
51 (should-error (nreverse (make-char-table 'foo))) 51 (should-error (nreverse (make-char-table 'foo)))
52 (should (equal (nreverse "xyzzy") "yzzyx")) 52 (should (equal (nreverse (copy-sequence "xyzzy")) "yzzyx"))
53 (let ((A [])) 53 (let ((A (vector)))
54 (nreverse A) 54 (nreverse A)
55 (should (equal A []))) 55 (should (equal A [])))
56 (let ((A [0])) 56 (let ((A (vector 0)))
57 (nreverse A) 57 (nreverse A)
58 (should (equal A [0]))) 58 (should (equal A [0])))
59 (let ((A [1 2 3 4])) 59 (let ((A (vector 1 2 3 4)))
60 (nreverse A) 60 (nreverse A)
61 (should (equal A [4 3 2 1]))) 61 (should (equal A [4 3 2 1])))
62 (let ((A [1 2 3 4])) 62 (let ((A (vector 1 2 3 4)))
63 (nreverse A) 63 (nreverse A)
64 (nreverse A) 64 (nreverse A)
65 (should (equal A [1 2 3 4]))) 65 (should (equal A [1 2 3 4])))
66 (let* ((A [1 2 3 4]) 66 (let* ((A (vector 1 2 3 4))
67 (B (nreverse (nreverse A)))) 67 (B (nreverse (nreverse A))))
68 (should (equal A B)))) 68 (should (equal A B))))
69 69
@@ -146,13 +146,13 @@
146;; Invalid UTF-8 sequences shall be indicated. How to create such strings? 146;; Invalid UTF-8 sequences shall be indicated. How to create such strings?
147 147
148(ert-deftest fns-tests-sort () 148(ert-deftest fns-tests-sort ()
149 (should (equal (sort '(9 5 2 -1 5 3 8 7 4) (lambda (x y) (< x y))) 149 (should (equal (sort (list 9 5 2 -1 5 3 8 7 4) (lambda (x y) (< x y)))
150 '(-1 2 3 4 5 5 7 8 9))) 150 '(-1 2 3 4 5 5 7 8 9)))
151 (should (equal (sort '(9 5 2 -1 5 3 8 7 4) (lambda (x y) (> x y))) 151 (should (equal (sort (list 9 5 2 -1 5 3 8 7 4) (lambda (x y) (> x y)))
152 '(9 8 7 5 5 4 3 2 -1))) 152 '(9 8 7 5 5 4 3 2 -1)))
153 (should (equal (sort '[9 5 2 -1 5 3 8 7 4] (lambda (x y) (< x y))) 153 (should (equal (sort (vector 9 5 2 -1 5 3 8 7 4) (lambda (x y) (< x y)))
154 [-1 2 3 4 5 5 7 8 9])) 154 [-1 2 3 4 5 5 7 8 9]))
155 (should (equal (sort '[9 5 2 -1 5 3 8 7 4] (lambda (x y) (> x y))) 155 (should (equal (sort (vector 9 5 2 -1 5 3 8 7 4) (lambda (x y) (> x y)))
156 [9 8 7 5 5 4 3 2 -1])) 156 [9 8 7 5 5 4 3 2 -1]))
157 (should (equal 157 (should (equal
158 (sort 158 (sort
@@ -172,7 +172,7 @@
172 ;; Punctuation and whitespace characters are relevant for POSIX. 172 ;; Punctuation and whitespace characters are relevant for POSIX.
173 (should 173 (should
174 (equal 174 (equal
175 (sort '("11" "12" "1 1" "1 2" "1.1" "1.2") 175 (sort (list "11" "12" "1 1" "1 2" "1.1" "1.2")
176 (lambda (a b) (string-collate-lessp a b "POSIX"))) 176 (lambda (a b) (string-collate-lessp a b "POSIX")))
177 '("1 1" "1 2" "1.1" "1.2" "11" "12"))) 177 '("1 1" "1 2" "1.1" "1.2" "11" "12")))
178 ;; Punctuation and whitespace characters are not taken into account 178 ;; Punctuation and whitespace characters are not taken into account
@@ -180,7 +180,7 @@
180 (when (eq system-type 'windows-nt) 180 (when (eq system-type 'windows-nt)
181 (should 181 (should
182 (equal 182 (equal
183 (sort '("11" "12" "1 1" "1 2" "1.1" "1.2") 183 (sort (list "11" "12" "1 1" "1 2" "1.1" "1.2")
184 (lambda (a b) 184 (lambda (a b)
185 (let ((w32-collate-ignore-punctuation t)) 185 (let ((w32-collate-ignore-punctuation t))
186 (string-collate-lessp 186 (string-collate-lessp
@@ -190,7 +190,7 @@
190 ;; Diacritics are different letters for POSIX, they sort lexicographical. 190 ;; Diacritics are different letters for POSIX, they sort lexicographical.
191 (should 191 (should
192 (equal 192 (equal
193 (sort '("Ævar" "Agustín" "Adrian" "Eli") 193 (sort (list "Ævar" "Agustín" "Adrian" "Eli")
194 (lambda (a b) (string-collate-lessp a b "POSIX"))) 194 (lambda (a b) (string-collate-lessp a b "POSIX")))
195 '("Adrian" "Agustín" "Eli" "Ævar"))) 195 '("Adrian" "Agustín" "Eli" "Ævar")))
196 ;; Diacritics are sorted between similar letters for other locales, 196 ;; Diacritics are sorted between similar letters for other locales,
@@ -198,7 +198,7 @@
198 (when (eq system-type 'windows-nt) 198 (when (eq system-type 'windows-nt)
199 (should 199 (should
200 (equal 200 (equal
201 (sort '("Ævar" "Agustín" "Adrian" "Eli") 201 (sort (list "Ævar" "Agustín" "Adrian" "Eli")
202 (lambda (a b) 202 (lambda (a b)
203 (let ((w32-collate-ignore-punctuation t)) 203 (let ((w32-collate-ignore-punctuation t))
204 (string-collate-lessp 204 (string-collate-lessp
@@ -212,7 +212,7 @@
212 (should (not (string-version-lessp "foo20000.png" "foo12.png"))) 212 (should (not (string-version-lessp "foo20000.png" "foo12.png")))
213 (should (string-version-lessp "foo.png" "foo2.png")) 213 (should (string-version-lessp "foo.png" "foo2.png"))
214 (should (not (string-version-lessp "foo2.png" "foo.png"))) 214 (should (not (string-version-lessp "foo2.png" "foo.png")))
215 (should (equal (sort '("foo12.png" "foo2.png" "foo1.png") 215 (should (equal (sort (list "foo12.png" "foo2.png" "foo1.png")
216 'string-version-lessp) 216 'string-version-lessp)
217 '("foo1.png" "foo2.png" "foo12.png"))) 217 '("foo1.png" "foo2.png" "foo12.png")))
218 (should (string-version-lessp "foo2" "foo1234")) 218 (should (string-version-lessp "foo2" "foo1234"))
@@ -432,9 +432,9 @@
432 (should-error (mapcan)) 432 (should-error (mapcan))
433 (should-error (mapcan #'identity)) 433 (should-error (mapcan #'identity))
434 (should-error (mapcan #'identity (make-char-table 'foo))) 434 (should-error (mapcan #'identity (make-char-table 'foo)))
435 (should (equal (mapcan #'list '(1 2 3)) '(1 2 3))) 435 (should (equal (mapcan #'list (list 1 2 3)) '(1 2 3)))
436 ;; `mapcan' is destructive 436 ;; `mapcan' is destructive
437 (let ((data '((foo) (bar)))) 437 (let ((data (list (list 'foo) (list 'bar))))
438 (should (equal (mapcan #'identity data) '(foo bar))) 438 (should (equal (mapcan #'identity data) '(foo bar)))
439 (should (equal data '((foo bar) (bar)))))) 439 (should (equal data '((foo bar) (bar))))))
440 440