&& (EQ (CODING_ID_EOL_TYPE (coding.id), Qunix)
|| inhibit_eol_conversion
|| ! memchr (SDATA (string), encodep ? '\n' : '\r', bytes)))
- return (nocopy
- ? string
- : (encodep
- ? make_unibyte_string (SSDATA (string), bytes)
- : make_multibyte_string (SSDATA (string), bytes, bytes)));
+ {
+ if (! norecord)
+ Vlast_coding_system_used = coding_system;
+ return (nocopy
+ ? string
+ : (encodep
+ ? make_unibyte_string (SSDATA (string), bytes)
+ : make_multibyte_string (SSDATA (string), bytes, bytes)));
+ }
}
else if (BUFFERP (dst_object))
{
(should-not (eq (decode-coding-string s coding nil) s))
(should-not (eq (encode-coding-string s coding nil) s))
(should (eq (decode-coding-string s coding t) s))
- (should (eq (encode-coding-string s coding t) s)))
+ (should (eq (encode-coding-string s coding t) s))
+ (should (eq last-coding-system-used coding)))
;; With EOL conversion inhibited.
(let ((inhibit-eol-conversion t))