bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#64739: (forward-thing 'number) doesn't work with decimal numbers


From: Eli Zaretskii
Subject: bug#64739: (forward-thing 'number) doesn't work with decimal numbers
Date: Sun, 23 Jul 2023 08:33:59 +0300

> From: Joseph Turner <joseph@breatheoutbreathe.in>
> Cc: Roland Winkler <winkler@gnu.org>, 64739@debbugs.gnu.org
> Date: Sat, 22 Jul 2023 20:36:16 -0700
> 
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > By "its own function" I meant that we implement it in Emacs, not that
> > you implement it in your personal customizations.
> 
> I see that the definition of number-at-point includes two magic regexps,
> one matching hex numbers and another matching decimal numbers. Would it
> make sense to move those regexps into defconsts, and then create a new
> function forward-number which uses those new constants?

That's probably one idea, yes.  (But note that those regexps don't
support numbers like "1.0e2".)

Another idea is to define a special-purpose syntax table and use that
with forward-word.

Yet another idea is to use 'read', since the Lisp reader already knows
how to read numbers.

And there probably are other ideas as well.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]