From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#8634: 24.0.50; `number-at-point' returns char value for `?' constructs - 1) doc, 2) new fns Date: Sun, 09 Feb 2014 18:17:00 +0200 Message-ID: <83r47cuupv.fsf@gnu.org> References: <458B95C58F7348C2AA62A340071C6E1C@us.oracle.com> <87lhxk7pjl.fsf@building.gnus.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1391962694 6201 80.91.229.3 (9 Feb 2014 16:18:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Feb 2014 16:18:14 +0000 (UTC) Cc: 8634@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 09 17:18:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WCX5F-0004xF-9C for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Feb 2014 17:18:17 +0100 Original-Received: from localhost ([::1]:51337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCX5E-0004ai-S4 for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Feb 2014 11:18:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCX57-0004aY-CX for bug-gnu-emacs@gnu.org; Sun, 09 Feb 2014 11:18:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCX52-0000IF-CD for bug-gnu-emacs@gnu.org; Sun, 09 Feb 2014 11:18:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46673) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCX52-0000I8-9K for bug-gnu-emacs@gnu.org; Sun, 09 Feb 2014 11:18:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WCX51-00045l-Uk for bug-gnu-emacs@gnu.org; Sun, 09 Feb 2014 11:18:04 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Feb 2014 16:18:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8634 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8634-submit@debbugs.gnu.org id=B8634.139196264915655 (code B ref 8634); Sun, 09 Feb 2014 16:18:03 +0000 Original-Received: (at 8634) by debbugs.gnu.org; 9 Feb 2014 16:17:29 +0000 Original-Received: from localhost ([127.0.0.1]:60688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WCX4P-00044M-Bp for submit@debbugs.gnu.org; Sun, 09 Feb 2014 11:17:28 -0500 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:43760) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WCX4J-000448-I1 for 8634@debbugs.gnu.org; Sun, 09 Feb 2014 11:17:23 -0500 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0N0Q00B00L1PYX00@mtaout25.012.net.il> for 8634@debbugs.gnu.org; Sun, 09 Feb 2014 18:16:26 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N0Q007IUL7E9A50@mtaout25.012.net.il>; Sun, 09 Feb 2014 18:16:26 +0200 (IST) In-reply-to: <87lhxk7pjl.fsf@building.gnus.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:85086 Archived-At: > From: Lars Ingebrigtsen > Date: Sat, 08 Feb 2014 22:45:02 -0800 > Cc: 8634@debbugs.gnu.org > > "Drew Adams" 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"?