all messages for Emacs-related lists mirrored at yhetil.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: Mon, 14 Dec 2015 17:52:31 +0200	[thread overview]
Message-ID: <83bn9t3u4g.fsf@gnu.org> (raw)
In-Reply-To: <jwvy4cxhfhw.fsf-monnier+emacsdiffs@gnu.org> (message from Stefan Monnier on Sun, 13 Dec 2015 23:25:28 -0500)

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: emacs-devel@gnu.org
> Date: Sun, 13 Dec 2015 23:25:28 -0500
> 
> > 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.
> 
> But if (inserted > 0) and the buffer was not empty beforehand, how can
> the subsequent code know (after we've called
> bset_enable_multibyte_characters) that it has to decode the earlier
> buffer's content (since bset_enable_multibyte_characters has thrown away
> the information that the earlier buffer's content was multibyte)?

adjust_after_insert (which is the code I alluded to above) doesn't do
any such decoding, it never did.  IOW, I just returned the situation
in this particular case to what it was before.  The unconditional call
to Fset_buffer_multibyte erroneously caused the gap and ZV adjustments
to be done twice when inserted is positive; this commit fixed that.

Feel free to make more changes there, I don't claim I understand this
code better than you do.  (I asked for comments, but no one
responded.)  Just make sure the two test cases, viz.:

  http://lists.gnu.org/archive/html/bug-gnu-emacs/2015-12/msg00171.html
  http://lists.gnu.org/archive/html/bug-gnu-emacs/2015-12/msg00442.html

both still work correctly.

Thanks.



      reply	other threads:[~2015-12-14 15:52 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
2015-12-14  4:25       ` Stefan Monnier
2015-12-14 15:52         ` Eli Zaretskii [this message]

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=83bn9t3u4g.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 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.