summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2009-09-01 03:18:44 +0000
committerGlenn Morris <rgm@gnu.org>2009-09-01 03:18:44 +0000
commit5f68c1b73688b4bae978c83e13d84051474e1a74 (patch)
tree84ed4307a25e1d02b68bf09d23044406dc4ea601 /lisp/progmodes
parent52199878ae82e1ae43fefe98dd83957bab4a1631 (diff)
downloademacs-5f68c1b73688b4bae978c83e13d84051474e1a74.tar.gz
Use forward-line rather than goto-line.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/flymake.el9
-rw-r--r--lisp/progmodes/gdb-mi.el9
-rw-r--r--lisp/progmodes/idlw-shell.el3
-rw-r--r--lisp/progmodes/python.el6
-rw-r--r--lisp/progmodes/verilog-mode.el3
5 files changed, 20 insertions, 10 deletions
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 549bf4abe63..69eac565892 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -805,7 +805,8 @@ Return t if it has at least one flymake overlay, nil if no overlay."
(defun flymake-highlight-line (line-no line-err-info-list)
"Highlight line LINE-NO in current buffer.
Perhaps use text from LINE-ERR-INFO-LIST to enhance highlighting."
- (goto-line line-no)
+ (goto-char (point-min))
+ (forward-line (1- line-no))
(let* ((line-beg (flymake-line-beginning-position))
(line-end (flymake-line-end-position))
(beg line-beg)
@@ -1269,7 +1270,8 @@ For the format of LINE-ERR-INFO, see `flymake-ler-make-ler'."
(if (not (file-exists-p file))
(flymake-log 1 "File %s does not exist" file)
(find-file file)
- (goto-line line)))
+ (goto-char (point-min))
+ (forward-line (1- line))))
;; flymake minor mode declarations
(defvar flymake-mode-line nil)
@@ -1443,7 +1445,8 @@ With arg, turn Flymake mode on if and only if arg is positive."
(defun flymake-goto-line (line-no)
"Go to line LINE-NO, then skip whitespace."
- (goto-line line-no)
+ (goto-char (point-min))
+ (forward-line (1- line-no))
(flymake-skip-whitespace))
(defun flymake-goto-next-error ()
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 2eb11df492e..63896d4a77a 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -910,7 +910,8 @@ with mouse-1 (default bindings)."
(gud-call (concat "until " (number-to-string line))))
(gdb-if-arrow gdb-disassembly-position
(save-excursion
- (goto-line (line-number-at-pos (posn-point end)))
+ (goto-char (point-min))
+ (forward-line (1- (line-number-at-pos (posn-point end))))
(forward-char 2)
(gud-call (concat "until *%a"))))))
@@ -930,7 +931,8 @@ line, and no execution takes place."
(gud-call (concat "jump " (number-to-string line)))))
(gdb-if-arrow gdb-disassembly-position
(save-excursion
- (goto-line (line-number-at-pos (posn-point end)))
+ (goto-char (point-min))
+ (forward-line (1- (line-number-at-pos (posn-point end))))
(forward-char 2)
(progn
(gud-call (concat "tbreak *%a"))
@@ -3337,7 +3339,8 @@ breakpoints buffer."
(display-buffer buffer))))
(setq gdb-source-window window)
(with-current-buffer buffer
- (goto-line (string-to-number line))
+ (goto-char (point-min))
+ (forward-line (1- (string-to-number line)))
(set-window-point window (point))))))
(error "Not recognized as break/watchpoint line")))))
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index 40418d7ad7f..2f959464415 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -2790,7 +2790,8 @@ Runs to the last statement and then steps 1 statement. Use the .out command."
(or (not bp-line) (funcall closer-func cur-line bp-line)))
(setq bp-line cur-line))))
(unless bp-line (error "No further breakpoints"))
- (goto-line bp-line)))
+ (goto-char (point-min))
+ (forward-line (1- bp-line))))
;; Examine Commands ------------------------------------------------------
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 308af6c02cc..4582163e17b 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2203,7 +2203,8 @@ Interactively, prompt for name."
(unless file (error "Don't know where `%s' is defined" name))
(pop-to-buffer (find-file-noselect file))
(when (integerp line)
- (goto-line line))))
+ (goto-char (point-min))
+ (forward-line (1- line)))))
;;;; Skeletons
@@ -2614,7 +2615,8 @@ find it."
target_buffer (cadr target)
target_fname (buffer-file-name target_buffer))
(switch-to-buffer-other-window target_buffer)
- (goto-line target_lineno)
+ (goto-char (point-min))
+ (forward-line (1- target_lineno))
(message "pdbtrack: line %s, file %s" target_lineno target_fname)
(python-pdbtrack-overlay-arrow t)
(pop-to-buffer origbuf t)
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 57a51fd2187..557d587e6f3 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -4071,7 +4071,8 @@ becomes:
(and (file-exists-p name)
(find-file-noselect name))))))))
(switch-to-buffer buffer)
- (goto-line (string-to-number line))
+ (goto-char (point-min))
+ (forward-line (- (string-to-number line)))
(end-of-line)
(catch 'already
(cond