[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Towards a cleaner build: epa-file
From: |
Eli Zaretskii |
Subject: |
Re: Towards a cleaner build: epa-file |
Date: |
Sat, 18 May 2019 12:13:28 +0300 |
> From: Lars Ingebrigtsen <address@hidden>
> Date: Sat, 18 May 2019 10:42:28 +0200
>
> (defun epa-file-decode-and-insert (string file visit beg end replace)
> (if (fboundp 'decode-coding-inserted-region)
> (save-restriction
> (narrow-to-region (point) (point))
> (insert (if enable-multibyte-characters
> (string-to-multibyte string)
> string))
> (decode-coding-inserted-region
> (point-min) (point-max)
> (substring file 0 (string-match epa-file-name-regexp file))
> visit beg end replace))
> (insert (epa-file--decode-coding-string string (or coding-system-for-read
> 'undecided)))))
>
> Isn't that check for `enable-multibyte-characters' and
> call to `string-to-multibyte' completely superfluous?
Yes, I think 'insert' already does that internally.
- Re: Towards a cleaner build: hexl, (continued)
Re: Towards a cleaner build: epa-file, Lars Ingebrigtsen, 2019/05/18
- Re: Towards a cleaner build: epa-file,
Eli Zaretskii <=