emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master b8062be 3/5: Remove some compat code from eudc-bob.el


From: Eli Zaretskii
Subject: Re: master b8062be 3/5: Remove some compat code from eudc-bob.el
Date: Thu, 13 Aug 2020 16:14:48 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Thu, 13 Aug 2020 10:08:26 +0200
> Cc: emacs-devel@gnu.org
> 
> (defun eudc-bob-save-object ()
>   "Save the object data of the button at point."
>   (interactive)
>   (let ((data (eudc-bob-get-overlay-prop 'object-data))
>       (buffer (generate-new-buffer "*eudc-tmp*")))
>     (save-excursion
>       (set-buffer-file-coding-system 'binary)
>       (set-buffer buffer)
>       (set-buffer-multibyte nil)
>       (insert data)
>       (save-buffer))
>     (kill-buffer buffer)))
> 
> I think the intention here is to change the coding system in this new
> temporary buffer (before saving), and not whatever buffer the caller of
> the function was...

I think we can simply delete the line that sets
buffer-file-coding-system: in a unibyte buffer it doesn't matter
anyway.  (And it's wrong to use 'binary' for producing files that will
be processed by programs other than Emacs, because 'binary' spills out
the Emacs internal representation of characters.)



reply via email to

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