changeset 104774:468b7fa34d2c

Use forward-line rather than goto-line.
author Glenn Morris <rgm@gnu.org>
date Tue, 01 Sep 2009 03:18:44 +0000
parents 380c4c2a4fc2
children 21469025a673
files lisp/ChangeLog lisp/progmodes/flymake.el lisp/progmodes/gdb-mi.el lisp/progmodes/idlw-shell.el lisp/progmodes/python.el lisp/progmodes/verilog-mode.el lisp/term/ns-win.el lisp/textmodes/bibtex.el
diffstat 8 files changed, 50 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Sep 01 03:17:28 2009 +0000
+++ b/lisp/ChangeLog	Tue Sep 01 03:18:44 2009 +0000
@@ -1,5 +1,27 @@
 2009-09-01  Glenn Morris  <rgm@gnu.org>
 
+	* net/eudc-bob.el (eudc-bob-generic-menu, eudc-bob-image-menu)
+	(eudc-bob-sound-menu): Use defvar rather than defconst, since
+	easy-menu-define wants to modify these.
+
+	* net/net-utils.el (nslookup): Use make-comint rather than comint-run.
+
+	* net/browse-url.el (browse-url-file-url):
+	* term/internal.el (dos-codepage-setup):
+	Use default-value rather than default-enable-multibyte-characters.
+
+	* progmodes/flymake.el (flymake-highlight-line)
+	(flymake-goto-file-and-line, flymake-goto-line):
+	* progmodes/gdb-mi.el (gdb-mouse-until, gdb-mouse-jump)
+	(gdb-goto-breakpoint):
+	* progmodes/idlw-shell.el (idlwave-shell-move-to-bp):
+	* progmodes/python.el (python-find-function)
+	(python-pdbtrack-track-stack-file):
+	* progmodes/verilog-mode.el (verilog-surelint-off):
+	* term/ns-win.el (ns-open-file-select-line):
+	* textmodes/bibtex.el (bibtex-validate, bibtex-validate-globally):
+	Use forward-line rather than goto-line.
+
 	* textmodes/reftex-cite.el (reftex-offer-bib-menu):
 	* textmodes/reftex-index.el (reftex-display-index):
 	* textmodes/reftex-ref.el (reftex-offer-label-menu):
--- a/lisp/progmodes/flymake.el	Tue Sep 01 03:17:28 2009 +0000
+++ b/lisp/progmodes/flymake.el	Tue Sep 01 03:18:44 2009 +0000
@@ -805,7 +805,8 @@
 (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 @@
   (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 @@
 
 (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 ()
--- a/lisp/progmodes/gdb-mi.el	Tue Sep 01 03:17:28 2009 +0000
+++ b/lisp/progmodes/gdb-mi.el	Tue Sep 01 03:18:44 2009 +0000
@@ -910,7 +910,8 @@
 		  (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 @@
 		    (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 @@
 			       (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")))))
 
--- a/lisp/progmodes/idlw-shell.el	Tue Sep 01 03:17:28 2009 +0000
+++ b/lisp/progmodes/idlw-shell.el	Tue Sep 01 03:18:44 2009 +0000
@@ -2790,7 +2790,8 @@
 	     (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 ------------------------------------------------------
 
--- a/lisp/progmodes/python.el	Tue Sep 01 03:17:28 2009 +0000
+++ b/lisp/progmodes/python.el	Tue Sep 01 03:18:44 2009 +0000
@@ -2203,7 +2203,8 @@
     (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 @@
                   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)
--- a/lisp/progmodes/verilog-mode.el	Tue Sep 01 03:17:28 2009 +0000
+++ b/lisp/progmodes/verilog-mode.el	Tue Sep 01 03:18:44 2009 +0000
@@ -4071,7 +4071,8 @@
                               (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
--- a/lisp/term/ns-win.el	Tue Sep 01 03:17:28 2009 +0000
+++ b/lisp/term/ns-win.el	Tue Sep 01 03:18:44 2009 +0000
@@ -723,9 +723,10 @@
     (if ns-select-overlay
         (setq ns-select-overlay (delete-overlay ns-select-overlay)))
     (deactivate-mark)
-    (goto-line (if (consp ns-input-line)
-                   (min (car ns-input-line) (cdr ns-input-line))
-                 ns-input-line)))
+    (goto-char (point-min))
+    (forward-line (1- (if (consp ns-input-line)
+                          (min (car ns-input-line) (cdr ns-input-line))
+                        ns-input-line))))
    (ns-input-line
     (if (not ns-select-overlay)
         (overlay-put (setq ns-select-overlay (make-overlay (point-min)
--- a/lisp/textmodes/bibtex.el	Tue Sep 01 03:17:28 2009 +0000
+++ b/lisp/textmodes/bibtex.el	Tue Sep 01 03:18:44 2009 +0000
@@ -3845,7 +3845,8 @@
               (insert (format "%s:%d: %s\n" file (car err) (cdr err))))
             (set-buffer-modified-p nil)
             (toggle-read-only 1)
-            (goto-line 3)) ; first error message
+            (goto-char (point-min))
+            (forward-line 2)) ; first error message
           (display-buffer err-buf)
           nil) ; return `nil' (i.e., buffer is invalid)
       (message "%s is syntactically correct"
@@ -3902,7 +3903,8 @@
             (dolist (err (sort error-list 'string-lessp)) (insert err))
             (set-buffer-modified-p nil)
             (toggle-read-only 1)
-            (goto-line 3)) ; first error message
+            (goto-char (point-min))
+            (forward-line 2)) ; first error message
           (display-buffer err-buf)
           nil) ; return `nil' (i.e., buffer is invalid)
       (message "No duplicate keys.")