[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#5989: 23.1.96; bug 4209 not completely fixed (regression in re-searc
From: |
Eli Zaretskii |
Subject: |
bug#5989: 23.1.96; bug 4209 not completely fixed (regression in re-search-forward) |
Date: |
Sat, 04 Jun 2016 19:15:50 +0300 |
> Date: Wed, 1 Jun 2016 21:29:36 -0400
> From: Noam Postavsky <npostavs@users.sourceforge.net>
>
> I can reproduce this on recent Emacs, with a small change to the
> recipe since enable-multibyte-characters can no longer be set
> directly:
>
> (set-buffer (get-buffer-create "*Test Buffer*"))
> (set-buffer-multibyte nil) ; instead of setting `enable-multibyte-characters'
>
> (insert "\xC2\x4C\xEF\x77\xC6\x69\x8C\x0A")
>
> (goto-char (point-min))
>
> (message "looking-at: %s" (looking-at
> "\\`\xC2\x4C\xEF\x77\xC6\x69\x8C\x0A"))
>
> (message "re-search-forward: %s"
> (re-search-forward "\\`\xC2\x4C\xEF\x77\xC6\x69\x8C\x0A" 100 t))
If you don't make the buffer unibyte, everything works as expected.
Using multibyte buffers even for raw bytes is what we recommend. So I
see no problem here that we should work on: unibyte buffers are not
meant to process text.
Thanks.