aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose E. Marchesi <[email protected]>2011-07-28 16:05:07 +0200
committerJuanma Barranquero <[email protected]>2011-07-28 16:05:07 +0200
commita514d8567cf3844f53e86244de14fb0184900ee1 (patch)
tree4baf5c307f9e05cbfa6556f7f9e157dba123a225
parent1fb8351b1d864005298e77af0b89f95508735d1b (diff)
Fix goto-line bug.
lisp/simple.el (goto-line): Use string-to-number to provide a numeric argument to read-number.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/simple.el9
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index afa15eab24..8b92eab857 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-28 Jose E. Marchesi <[email protected]>
+
+ * simple.el (goto-line): Use string-to-number to provide a
+ numeric argument to read-number.
+
2011-07-27 Michael Albinus <[email protected]>
* net/tramp-sh.el (tramp-maybe-send-script): Don't let-bind the
diff --git a/lisp/simple.el b/lisp/simple.el
index 7fd7e20b49..fe46e36fda 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -900,10 +900,11 @@ rather than line counts."
(save-excursion
(skip-chars-backward "0-9")
(if (looking-at "[0-9]")
- (buffer-substring-no-properties
- (point)
- (progn (skip-chars-forward "0-9")
- (point))))))
+ (string-to-number
+ (buffer-substring-no-properties
+ (point)
+ (progn (skip-chars-forward "0-9")
+ (point)))))))
;; Decide if we're switching buffers.
(buffer
(if (consp current-prefix-arg)