all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: emacs-devel@gnu.org
Cc: Eli Zaretskii <eliz@gnu.org>
Subject: Re: [Emacs-diffs] emacs-25 25e461c 1/2: Fix visiting files with raw-text
Date: Sun, 13 Dec 2015 15:25:33 -0500	[thread overview]
Message-ID: <jwvr3iqhzfj.fsf-monnier+emacsdiffs@gnu.org> (raw)
In-Reply-To: <E1a8Cgi-00039X-Ic@vcs.savannah.gnu.org> (Eli Zaretskii's message of "Sun, 13 Dec 2015 19:52:08 +0000")

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



       reply	other threads:[~2015-12-13 20:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20151213195208.12085.93274@vcs.savannah.gnu.org>
     [not found] ` <E1a8Cgi-00039X-Ic@vcs.savannah.gnu.org>
2015-12-13 20:25   ` Stefan Monnier [this message]
2015-12-13 20:46     ` [Emacs-diffs] emacs-25 25e461c 1/2: Fix visiting files with raw-text Eli Zaretskii
2015-12-14  4:25       ` Stefan Monnier
2015-12-14 15:52         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvr3iqhzfj.fsf-monnier+emacsdiffs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.