unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@suse.de>
Cc: Kenichi Handa <handa@m17n.org>
Subject: Re: Lisp reader bug
Date: Fri, 04 Apr 2003 17:53:39 +0200	[thread overview]
Message-ID: <jepto2p8cc.fsf@sykes.suse.de> (raw)
In-Reply-To: <5xwuiab37d.fsf@kfs2.cua.dk> (Kim F. Storm's message of "04 Apr 2003 19:08:22 +0200")

storm@cua.dk (Kim F. Storm) writes:

|> Kenichi Handa <handa@m17n.org> writes:
|> 
|> > Emacs of CVS HEAD has a bug in Lisp reader.  For instance,
|> > 
|> > (read (format "'%c" (decode-char 'ucs #x102)))
|> > => (quote )
|> > 
|> > I'm not sure, but perhaps this change is the cause.
|> > 
|> > 2003-02-18  Kim F. Storm  <storm@cua.dk>
|> > 
|> > 	* lread.c (read1): Fix last change.
|> > 	"`" is not always special.  Allow "?" after a character constant.
|> > 
|> > This change adds codes something like this (total 4 places):
|> > 
|> > 	  || index ("\"';([#?", next_next_char)
|> > 
|> > but, it seems that `index' doesn't work well if the second
|> > arg is greater than 0xFF.  Actually, if I change such lines
|> > to:
|> > 
|> > 	  || (next_next_char < 0x100 && index ("\"';([#?", next_next_char))
|> > 
|> > the bug disappears.
|> > 
|> > Kim, could you take a look at this problem?
|> 
|> I'm not aware of that limitation in `index' (it is not documented),

The POSIX standard says that index shall be equivalen to strchr, and the C
standard says that strchr converts its second argument to char before the
comparison.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  reply	other threads:[~2003-04-04 15:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-04 11:24 Lisp reader bug Kenichi Handa
2003-04-04 17:08 ` Kim F. Storm
2003-04-04 15:53   ` Andreas Schwab [this message]
2003-04-09  7:14   ` Kenichi Handa
2003-04-05  8:12 ` Richard Stallman
2003-04-09  7:18   ` Kenichi Handa

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=jepto2p8cc.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=handa@m17n.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 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).