unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] emacs-25 25e461c 1/2: Fix visiting files with raw-text
Date: Sun, 13 Dec 2015 22:46:24 +0200	[thread overview]
Message-ID: <83k2oi3wm7.fsf@gnu.org> (raw)
In-Reply-To: <jwvr3iqhzfj.fsf-monnier+emacsdiffs@gnu.org> (message from Stefan Monnier on Sun, 13 Dec 2015 15:25:33 -0500)

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: Eli Zaretskii <eliz@gnu.org>
> Date: Sun, 13 Dec 2015 15:25:33 -0500
> 
> > -	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?

If inserted is positive, there's code after that which takes care of
adjusting the buffer's gap etc.  So it's only needed when nothing was
inserted.




  reply	other threads:[~2015-12-13 20:46 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   ` [Emacs-diffs] emacs-25 25e461c 1/2: Fix visiting files with raw-text Stefan Monnier
2015-12-13 20:46     ` Eli Zaretskii [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83k2oi3wm7.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).