(when lread--unescaped-character-literals
(byte-compile-warn
"unescaped character literals %s detected!"
- (mapconcat #'string
+ (mapconcat (lambda (char) (format "`?%c'" char))
(sort lread--unescaped-character-literals #'<)
", ")))
(byte-compile-toplevel-file-form form)))
AUTO_STRING (format,
"Loading `%s': unescaped character literals %s detected!");
AUTO_STRING (separator, ", ");
+ AUTO_STRING (inner_format, "`?%c'");
CALLN (Fmessage,
format, file,
- Fmapconcat (Qstring,
+ Fmapconcat (list3 (Qlambda, list1 (Qchar),
+ list3 (Qformat, inner_format, Qchar)),
Fsort (Vlread_unescaped_character_literals, Qlss),
separator));
}
"lread--unescaped-character-literals");
DEFSYM (Qlss, "<");
+ DEFSYM (Qchar, "char");
+ DEFSYM (Qformat, "format");
DEFVAR_BOOL ("load-prefer-newer", load_prefer_newer,
doc: /* Non-nil means `load' prefers the newest version of a file.
(err (should-error (byte-compile-file source))))
(should (equal (cdr err)
(list (concat "unescaped character literals "
- "\", (, ), ;, [, ] detected!"))))))))
+ "`?\"', `?(', `?)', `?;', `?[', `?]' "
+ "detected!"))))))))
;; Local Variables:
;; no-byte-compile: t
(should (equal (lread-tests--last-message)
(concat (format-message "Loading `%s': " file-name)
"unescaped character literals "
- "\", (, ), ;, [, ] detected!")))))
+ "`?\"', `?(', `?)', `?;', `?[', `?]' detected!")))))
(ert-deftest lread-test-bug26837 ()
"Test for http://debbugs.gnu.org/26837 ."