emacs-devel
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]