diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2020-04-09 12:04:22 +0200 |
---|---|---|
committer | Mattias EngdegÄrd <mattiase@acm.org> | 2020-04-09 12:50:35 +0200 |
commit | d3e2c88041b4844422bda64b1ee51678dc8a2e88 (patch) | |
tree | 5108104aceb42394dcf860759ab0b85a140521a4 /lisp/emacs-lisp/lisp.el | |
parent | 95dd8de1df19a8529efb66257ac78789be62ca37 (diff) | |
download | emacs-d3e2c88041b4844422bda64b1ee51678dc8a2e88.tar.gz emacs-d3e2c88041b4844422bda64b1ee51678dc8a2e88.tar.bz2 emacs-d3e2c88041b4844422bda64b1ee51678dc8a2e88.zip |
Fix ASCII-only conversion logic (bug#40407)
To sidestep conversion altogether when EOL conversion applies, we must
either be encoding a string without NL, or decoding without CR.
* src/coding.c (string_ascii_p): Revert to a pure predicate.
(code_convert_string): Fix logic. Don't use uninitialised
ascii_p (removed). Use memchr to detect CR or LF in string when needed.
* test/src/coding-tests.el (coding-nocopy-ascii):
Update tests to include encodings with explicit EOL conversions.
Diffstat (limited to 'lisp/emacs-lisp/lisp.el')
0 files changed, 0 insertions, 0 deletions