From: bojohan@gnu.org (Johan Bockgård)
To: help-gnu-emacs@gnu.org
Subject: Re: search-forward in emacs23 lisp
Date: Mon, 29 Mar 2010 01:00:45 +0200 [thread overview]
Message-ID: <87y6hchx0i.fsf@gnu.org> (raw)
In-Reply-To: <20100327.153148.886429907165788179.rasmith@aristotle.tamu.edu> (rasmith@tamu.edu's message of "Sat, 27 Mar 2010 15:31:48 -0500 (CDT)")
rasmith@tamu.edu writes:
> If I move to the buffer that contains the data to be parsed (which has
> its multibyte flag set to nil), then
> (search-forward (unibyte-string ?\377)) behaves as above. However, in
> that same buffer, a keyboard isearch-forward for \377 finds a \377
> with no problem.
There does seem to be a bug regarding search in unibyte buffers,
;; This works
(let ((case-fold-search nil)) (search-forward "\377"))
;; This actually matches \277 instead!
(let ((case-fold-search t)) (search-forward "\377"))
Isearch works, by luck, since it binds case-fold-search to nil because
of this strange behavior of `downcase' in a unibyte context,
(let ((default-enable-multibyte-characters nil))
(with-temp-buffer
(downcase 255))) ; worked correctly in Emacs 22
=> 4194303
next prev parent reply other threads:[~2010-03-28 23:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-27 20:31 search-forward in emacs23 lisp rasmith
2010-03-28 16:39 ` rasmith
2010-03-28 16:50 ` Lennart Borgman
2010-03-28 17:04 ` rasmith
2010-03-28 17:10 ` Lennart Borgman
2010-03-28 17:56 ` rasmith
2010-03-28 17:59 ` rasmith
2010-03-28 18:22 ` Lennart Borgman
2010-03-28 21:45 ` Peter Dyballa
2010-03-29 0:44 ` rasmith
2010-03-28 23:00 ` Johan Bockgård [this message]
2010-03-29 6:51 ` Eli Zaretskii
2010-03-29 15:01 ` rasmith
2010-03-29 15:17 ` 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=87y6hchx0i.fsf@gnu.org \
--to=bojohan@gnu.org \
--cc=help-gnu-emacs@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.