emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] fix goto-line


From: Jose E. Marchesi
Subject: [PATCH] fix goto-line
Date: Thu, 28 Jul 2011 14:57:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

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  <address@hidden>

        * 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    address@hidden
GNU Project         http://www.gnu.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]