[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master 58a3c54: Avoid using string-make-unibyte in sel
Re: [Emacs-diffs] master 58a3c54: Avoid using string-make-unibyte in select.el
Sat, 22 Jun 2019 16:42:27 +0300
> From: Stefan Monnier <address@hidden>
> Cc: Eli Zaretskii <address@hidden>
> Date: Sat, 22 Jun 2019 09:26:38 -0400
> > + (or (null (multibyte-string-p str))
> > + (setq str (encode-coding-string 'raw-text-unix str))))
> Isn't this the same as (setq str (string-to-unibyte str))?
No, because the former doesn't signal an error. (And I didn't want to
use any of those string-to/as-uni/multibyte functions anyway.)
The only thing we are supposed to do in the multibyte case is to make
sure the raw bytes are converted to their single-byte representation,
which is exactly what raw-text-unix does.