changeset 104776:51f16a1079af

(etags-goto-tag-location): Use forward-line rather than goto-line.
author Glenn Morris <rgm@gnu.org>
date Tue, 01 Sep 2009 03:26:32 +0000
parents 21469025a673
children 537e1db33ebf
files lisp/progmodes/etags.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/etags.el	Tue Sep 01 03:25:10 2009 +0000
+++ b/lisp/progmodes/etags.el	Tue Sep 01 03:26:32 2009 +0000
@@ -1,8 +1,8 @@
 ;;; etags.el --- etags facility for Emacs
 
 ;; Copyright (C) 1985, 1986, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1998,
-;;               2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-;;	Free Software Foundation, Inc.
+;;   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+;;   Free Software Foundation, Inc.
 
 ;; Author: Roland McGrath <roland@gnu.org>
 ;; Maintainer: FSF
@@ -1331,7 +1331,8 @@
 	offset found pat)
     (if (eq (car tag-info) t)
 	;; Direct file tag.
-	(cond (line (goto-line line))
+	(cond (line (progn (goto-char (point-min))
+			   (forward-line (1- line))))
 	      (startpos (goto-char startpos))
 	      (t (error "etags.el BUG: bogus direct file tag")))
       ;; This constant is 1/2 the initial search window.
@@ -1349,7 +1350,8 @@
       ;; If no char pos was given, try the given line number.
       (or startpos
 	  (if line
-	      (setq startpos (progn (goto-line line)
+	      (setq startpos (progn (goto-char (point-min))
+				    (forward-line (1- line))
 				    (point)))))
       (or startpos
 	  (setq startpos (point-min)))