unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37458: 27.0.50; number-at-point misses hex
@ 2019-09-19 11:18 Andreas Röhler
  2019-09-20 17:41 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Röhler @ 2019-09-19 11:18 UTC (permalink / raw)
  To: 37458

number-at-point from thingatpt.el doesn't recognize hex-numbers.

Currently defined like that:

(defun number-at-point ()
   "Return the number at point, or nil if none is found."
   (when (thing-at-point-looking-at "-?[0-9]+\\.?[0-9]*" 500)
     (string-to-number
      (buffer-substring (match-beginning 0) (match-end 0)))))

Maybe make the regexp customizable?

Thanks,

Andreas

In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32)
  of 2019-09-12






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-22 15:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-19 11:18 bug#37458: 27.0.50; number-at-point misses hex Andreas Röhler
2019-09-20 17:41 ` Lars Ingebrigtsen
2019-09-22 15:44   ` Andreas Röhler

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).