GNU bug report logs - #13177
24.3.50; doc of `read-char-by-name'

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Fri, 14 Dec 2012 04:03:01 UTC

Severity: minor

Merged with 13195

Found in version 24.3.50

Done: Chong Yidong <cyd <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Stefan Monnier'" <monnier <at> iro.umontreal.ca>
Cc: 'Juri Linkov' <juri <at> jurta.org>, 13177 <at> debbugs.gnu.org
Subject: bug#13177: 24.3.50; doc of `read-char-by-name'
Date: Sat, 15 Dec 2012 15:39:29 -0800
> > The problem for me is that I don't know what the intention (design)
> > was or why.  Maybe someone has a good reason to return nil or to
> > return a number that does not correspond to a recognized code point?
> 
> It's called "read-char-by-name", so the intention is pretty clear: it
> should return a char.

Great.  That's what I would prefer also.  And that was exactly what I said in
the original bug report: that's what the other `read*' functions do: return the
thing their names say they read.

So we start with a code bug - make sure it always returns a char.  Then we fix
the doc.

However, this function has been around for a while, so there might be some code
that expects it to sometimes return nil or sometimes a non code-point number.
Hopefully, any code expecting nil is only trying to workaround this same bug...

Anyway, FWIW you've got my vote in favor of fixing the code to always return a
char.





This bug report was last modified 12 years and 211 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.