(etags-goto-tag-location): Use forward-line rather than goto-line.
authorGlenn Morris <rgm@gnu.org>
Tue, 1 Sep 2009 03:27:52 +0000 (03:27 +0000)
committerGlenn Morris <rgm@gnu.org>
Tue, 1 Sep 2009 03:27:52 +0000 (03:27 +0000)
lisp/ChangeLog
lisp/progmodes/etags.el

index 280d258..66e5cae 100644 (file)
@@ -1,5 +1,8 @@
 2009-09-01  Glenn Morris  <rgm@gnu.org>
 
+       * mail/feedmail.el (file-name-buffer-file-type-alist): Define for
+       compiler.
+
        * 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.
@@ -10,6 +13,7 @@
        * term/internal.el (dos-codepage-setup):
        Use default-value rather than default-enable-multibyte-characters.
 
+       * progmodes/etags.el (etags-goto-tag-location):
        * progmodes/flymake.el (flymake-highlight-line)
        (flymake-goto-file-and-line, flymake-goto-line):
        * progmodes/gdb-mi.el (gdb-mouse-until, gdb-mouse-jump)
index f3ffa1c..7a557e9 100644 (file)
@@ -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 @@ hits the start of file."
        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 @@ hits the start of file."
       ;; 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)))