[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] emacs-25 25e461c 1/2: Fix visiting files with raw-text
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] emacs-25 25e461c 1/2: Fix visiting files with raw-text |
Date: |
Sun, 13 Dec 2015 15:25:33 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
> - Fset_buffer_multibyte (Qnil);
> + if (inserted > 0)
> + bset_enable_multibyte_characters (current_buffer, Qnil);
> + else
> + Fset_buffer_multibyte (Qnil);
Hmm... IIUC if (inserted > 0) we need bset_enable_multibyte_characters
because Fset_buffer_multibyte would try to convert the chars we
just inserted.
And IIUC we recently switched to Fset_buffer_multibyte in order to
handle the case where the buffer was not empty when we started (in
which case we need to convert the content that was present before we
started insertion).
So, IIUC if the buffer was not empty to start with *and* (inserted > 0),
then we have a problem because neither function is right.
Or did I miss something?
Stefan
- Re: [Emacs-diffs] emacs-25 25e461c 1/2: Fix visiting files with raw-text,
Stefan Monnier <=