[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8634: 24.0.50; `number-at-point' returns char value for `?' construc
From: |
Lars Ingebrigtsen |
Subject: |
bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns |
Date: |
Sat, 08 Feb 2014 22:45:02 -0800 |
User-agent: |
Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.3.50 (gnu/linux) |
"Drew Adams" <drew.adams@oracle.com> 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. Closing. Please reopen if you're still
seeing this.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
- bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns,
Lars Ingebrigtsen <=
- bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns, Eli Zaretskii, 2014/02/09
- bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns, Lars Ingebrigtsen, 2014/02/09
- bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns, Drew Adams, 2014/02/09
- bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns, Lars Ingebrigtsen, 2014/02/09
- bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns, Drew Adams, 2014/02/09
- bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns, Eli Zaretskii, 2014/02/09
- bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns, Eli Zaretskii, 2014/02/09
- bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns, Lars Ingebrigtsen, 2014/02/09
- bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns, Drew Adams, 2014/02/09
- bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns, Nicolas Richard, 2014/02/10