Subject: bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns

From: Eli Zaretskii <[email-masked]>
Date: Sun, 09 Feb 2014 18:17:00 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Sat, 08 Feb 2014 22:45:02 -0800
> Cc: [email-masked]
> 
> "Drew Adams" <[email-masked]> writes:
> 
> > `number-at-point' is defined like this:
> >
> > (defun number-at-point ()
> >   "Return the number at point, or nil if none is found."
> >   (form-at-point 'sexp 'numberp))
> >
> > That uses `read-from-string' for the sexp at point, and testing whether the
> > result is `numberp'.
> >
> > That's fine, I guess, but it means that with buffer text such as ?A or ?\A-\^@
> > you get a non-nil result: the character value (wholenump) for ?A, which is 65,
> > and 4194304, respectively.  If you are depending on code to find _numerals_ in
> > text and return their numeric values then this is not what you want.  In that
> > case, you want a function that returns nil when point is not on a numeral.
> 
> Looks like this is fixed now.

Are you saying that "M-: (number-at-point) RET" with point at ?A says
"nil"?