all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: jemarch@gnu.org (Jose E. Marchesi)
To: emacs-devel@gnu.org
Subject: [PATCH] fix goto-line
Date: Thu, 28 Jul 2011 14:57:49 +0200	[thread overview]
Message-ID: <874o26muk2.fsf@gnu.org> (raw)


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  <jemarch@gnu.org>

	* 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



             reply	other threads:[~2011-07-28 12:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28 12:57 Jose E. Marchesi [this message]
2011-07-28 14:07 ` [PATCH] fix goto-line Juanma Barranquero
2011-07-28 17:38   ` bug#9163: " Eduard Wiebe
2011-07-28 17:38   ` Eduard Wiebe
2011-07-29 11:15   ` Juri Linkov
2011-07-29 11:22     ` Juanma Barranquero
2011-07-29 15:28       ` Juri Linkov
2011-07-29 16:45         ` Paul Eggert
2011-07-30  9:17           ` dired-do-touch (was: [PATCH] fix goto-line) Juri Linkov
2011-07-30  9:50             ` dired-do-touch Juri Linkov
2011-07-30  9:54             ` dired-do-touch (was: [PATCH] fix goto-line) Andreas Schwab
2011-07-30 11:01               ` dired-do-touch Juri Linkov

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

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

  git send-email \
    --in-reply-to=874o26muk2.fsf@gnu.org \
    --to=jemarch@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.