summaryrefslogtreecommitdiff
path: root/lisp/progmodes/ada-xref.el
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2009-08-22 19:29:18 +0000
committerGlenn Morris <rgm@gnu.org>2009-08-22 19:29:18 +0000
commite6ce8c4239a0b7003430d94a5f591e1d4ad50213 (patch)
tree17852bba62da89f449af8c75f4fe50a3fb89852f /lisp/progmodes/ada-xref.el
parenta569b4801085fa14c3bd0d153e389636645908b9 (diff)
downloademacs-e6ce8c4239a0b7003430d94a5f591e1d4ad50213.tar.gz
emacs-e6ce8c4239a0b7003430d94a5f591e1d4ad50213.tar.bz2
emacs-e6ce8c4239a0b7003430d94a5f591e1d4ad50213.zip
Use forward-line rather than goto-line.
Diffstat (limited to 'lisp/progmodes/ada-xref.el')
-rw-r--r--lisp/progmodes/ada-xref.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el
index 82df4be3dfd..4bb53a85f47 100644
--- a/lisp/progmodes/ada-xref.el
+++ b/lisp/progmodes/ada-xref.el
@@ -1,7 +1,7 @@
;; ada-xref.el --- for lookup and completion in Ada mode
;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de>
;; Rolf Ebert <ebert@inf.enst.fr>
@@ -1901,7 +1901,8 @@ This function is disabled for operators, and only works for identifiers."
(ada-name-of identlist)))
;; one => should be the right one
((= len 1)
- (goto-line (caar declist)))
+ (goto-char (point-min))
+ (forward-line (1- (caar declist))))
;; more than one => display choice list
(t
@@ -1937,7 +1938,8 @@ This function is disabled for operators, and only works for identifiers."
(read-from-minibuffer "Enter No. of your choice: "))))
)
(set-buffer ali-buffer)
- (goto-line (car (nth (1- choice) declist)))
+ (goto-char (point-min))
+ (forward-line (1- (car (nth (1- choice) declist))))
))))))
@@ -2166,7 +2168,8 @@ If OTHER-FRAME is non-nil, creates a new frame to show the file."
;; move the cursor to the correct position
(push-mark)
- (goto-line line)
+ (goto-char (point-min))
+ (forward-line (1- line))
(move-to-column column)
;; If we are not on the identifier, the ali file was not up-to-date.