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: Stefan Monnier
Subject: Re: master b8062be 3/5: Remove some compat code from eudc-bob.el
Date: Wed, 12 Aug 2020 14:15:15 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>      (save-excursion
>> -      (if (fboundp 'set-buffer-file-coding-system)
>> -          (set-buffer-file-coding-system 'binary))
>> +      (set-buffer-file-coding-system 'binary)
>>        (set-buffer buffer)
>
> This seems like "obviously wrong code" (setting the coding system and
> then doing `set-buffer'), but I don't use eudc, so ... perhaps it really
> wants to set the coding system in the original buffer?

Indeed, and the setting of coding-system can be moved before the
`save-excursion` after which you the byte-compiler will see the
`save-excursion + set-buffer` and recommend to use `with-current-buffer`
instead.




reply via email to

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