From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jemarch@gnu.org (Jose E. Marchesi) Newsgroups: gmane.emacs.devel Subject: [PATCH] fix goto-line Date: Thu, 28 Jul 2011 14:57:49 +0200 Message-ID: <874o26muk2.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1311858264 9762 80.91.229.12 (28 Jul 2011 13:04:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 28 Jul 2011 13:04:24 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 28 15:04:20 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QmQGC-0002Iz-27 for ged-emacs-devel@m.gmane.org; Thu, 28 Jul 2011 15:04:20 +0200 Original-Received: from localhost ([::1]:43583 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmQGB-0002DH-Jc for ged-emacs-devel@m.gmane.org; Thu, 28 Jul 2011 09:04:19 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:55683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmQG8-0002D1-99 for emacs-devel@gnu.org; Thu, 28 Jul 2011 09:04:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmQG7-0006Pw-6c for emacs-devel@gnu.org; Thu, 28 Jul 2011 09:04:16 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]:44216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmQG7-0006Pr-59 for emacs-devel@gnu.org; Thu, 28 Jul 2011 09:04:15 -0400 Original-Received: from [213.157.30.140] (port=38937 helo=termi.gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1QmQG6-0001f3-MB for emacs-devel@gnu.org; Thu, 28 Jul 2011 09:04:15 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:142449 Archived-At: Hi hackers! Just a tiny patch fixing a problem in goto-line, which was passing a string as the second parameter to read-number, triggering an error. 2011-07-28 Jose E. Marchesi * simple.el (goto-line): Use string-to-number to provide a numeric argument to read-number. --- lisp/simple.el 2011-07-16 18:42:38 +0000 +++ lisp/simple.el 2011-07-28 12:47:34 +0000 @@ -900,10 +900,11 @@ (save-excursion (skip-chars-backward "0-9") (if (looking-at "[0-9]") - (buffer-substring-no-properties + (string-to-number + (buffer-substring-no-properties (point) (progn (skip-chars-forward "0-9") - (point)))))) + (point))))))) ;; Decide if we're switching buffers. (buffer (if (consp current-prefix-arg) -- Jose E. Marchesi jemarch@gnu.org GNU Project http://www.gnu.org