unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Nicolas Richard <theonewiththeevillook@yahoo.fr>
Cc: 8634@debbugs.gnu.org
Subject: bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2)	new fns
Date: Thu, 28 Apr 2016 12:38:54 +0200	[thread overview]
Message-ID: <87r3dqow5d.fsf@gnus.org> (raw)
In-Reply-To: <87d2ivavqo.fsf@yahoo.fr> (Nicolas Richard's message of "Mon, 10 Feb 2014 15:27:27 +0100")

Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:

> The following definition seems to fix that dependance (500 is arbitrary
> choice -- the same arbitrary choice as for emails) :
>
> diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el
> index 9a40049..7b4cf56 100644
> --- a/lisp/thingatpt.el
> +++ b/lisp/thingatpt.el
> @@ -581,7 +581,10 @@ Signal an error if the entire string was not used."
>  ;;;###autoload
>  (defun number-at-point ()
>    "Return the number at point, or nil if none is found."
> -  (form-at-point 'sexp 'numberp))
> +  (when (thing-at-point-looking-at "-?[0-9]+\\.?[0-9]*" 500)
> +    (string-to-number
> +     (buffer-substring (match-beginning 0) (match-end 0)))))
> +
>  (put 'number 'thing-at-point 'number-at-point)
>  ;;;###autoload
>  (defun list-at-point ()

Thanks; applied to the trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





      reply	other threads:[~2016-04-28 10:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-07 15:30 bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns Drew Adams
2011-05-07 15:34 ` bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2)new fns Drew Adams
2014-02-09  6:45 ` bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns Lars Ingebrigtsen
2014-02-09 16:17   ` Eli Zaretskii
2014-02-10  1:04     ` Lars Ingebrigtsen
2014-02-10  1:20       ` Drew Adams
2014-02-10  2:20         ` Lars Ingebrigtsen
2014-02-10  3:20           ` Drew Adams
2014-02-10  3:59             ` Eli Zaretskii
2014-02-10  3:41       ` Eli Zaretskii
2014-02-10  3:59         ` Lars Ingebrigtsen
2014-02-10  4:06           ` Drew Adams
2014-02-10 14:27             ` Nicolas Richard
2016-04-28 10:38               ` Lars Ingebrigtsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r3dqow5d.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=8634@debbugs.gnu.org \
    --cc=theonewiththeevillook@yahoo.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).