diff options
author | Glenn Morris <rgm@gnu.org> | 2009-08-22 19:29:18 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2009-08-22 19:29:18 +0000 |
commit | e6ce8c4239a0b7003430d94a5f591e1d4ad50213 (patch) | |
tree | 17852bba62da89f449af8c75f4fe50a3fb89852f /lisp/progmodes | |
parent | a569b4801085fa14c3bd0d153e389636645908b9 (diff) | |
download | emacs-e6ce8c4239a0b7003430d94a5f591e1d4ad50213.tar.gz |
Use forward-line rather than goto-line.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/ada-mode.el | 9 | ||||
-rw-r--r-- | lisp/progmodes/ada-xref.el | 11 | ||||
-rw-r--r-- | lisp/progmodes/ebrowse.el | 8 | ||||
-rw-r--r-- | lisp/progmodes/gud.el | 9 | ||||
-rw-r--r-- | lisp/progmodes/idlw-shell.el | 11 | ||||
-rw-r--r-- | lisp/progmodes/vhdl-mode.el | 9 |
6 files changed, 35 insertions, 22 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index c28926dbb3d..89cbdd18454 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -1,7 +1,7 @@ ;;; ada-mode.el --- major-mode for editing Ada sources ;; Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ;; Author: Rolf Ebert <ebert@inf.enst.fr> ;; Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de> @@ -229,6 +229,8 @@ It may be `downcase-word', `upcase-word', `ada-loose-case-word' or (const ada-no-auto-case)) :group 'ada) +;; FIXME If this is not something required by the ada language, this +;; should be removed. (defcustom ada-clean-buffer-before-saving t "*Non-nil means remove trailing spaces and untabify the buffer before saving." :type 'boolean :group 'ada) @@ -793,8 +795,9 @@ the 4 file locations can be clicked on and jumped to." (compilation-find-file (point-marker) (match-string 1) "./") (set-buffer file) - (if (stringp line) - (goto-line (string-to-number line))) + (when (stringp line) + (goto-char (point-min)) + (forward-line (1- (string-to-number line)))) (setq source (point-marker))) 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. diff --git a/lisp/progmodes/ebrowse.el b/lisp/progmodes/ebrowse.el index 7e53ec8a5f6..f9cb486eb18 100644 --- a/lisp/progmodes/ebrowse.el +++ b/lisp/progmodes/ebrowse.el @@ -1,7 +1,7 @@ ;;; ebrowse.el --- Emacs C++ class browser & tags facility ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 ;; Free Software Foundation Inc. ;; Author: Gerd Moellmann <gerd@gnu.org> @@ -1337,7 +1337,8 @@ With PREFIX, insert that many filenames." (setf ebrowse--show-file-names-flag (not ebrowse--show-file-names-flag)) (let ((old-line (count-lines (point-min) (point)))) (ebrowse-redraw-tree) - (goto-line old-line))) + (goto-char (point-min)) + (forward-line (1- old-line)))) @@ -4316,7 +4317,8 @@ NUMBER-OF-STATIC-VARIABLES:" (interactive) (let* ((maxlin (count-lines (point-min) (point-max))) (n (min maxlin (+ 2 (string-to-number (this-command-keys)))))) - (goto-line n) + (goto-char (point-min)) + (forward-line (1- n)) (throw 'electric-buffer-menu-select (point)))) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 4b77f4a1ff5..0d3679575d6 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -1,12 +1,12 @@ ;;; gud.el --- Grand Unified Debugger mode for running GDB and other debuggers +;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, 2002, 2003, +;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> ;; Maintainer: FSF ;; Keywords: unix, tools -;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. - ;; This file is part of GNU Emacs. ;; GNU Emacs is free software: you can redistribute it and/or modify @@ -2715,7 +2715,8 @@ Obeying it means displaying in another window the specified file and line." (setq gud-keep-buffer t))) (save-restriction (widen) - (goto-line line) + (goto-char (point-min)) + (forward-line (1- line)) (setq pos (point)) (or gud-overlay-arrow-position (setq gud-overlay-arrow-position (make-marker))) diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index a57fba4e822..40418d7ad7f 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el @@ -1,7 +1,7 @@ ;; idlw-shell.el --- run IDL as an inferior process of Emacs. -;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -;; Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +;; 2009 Free Software Foundation, Inc. ;; Authors: J.D. Smith <jdsmith@as.arizona.edu> ;; Carsten Dominik <dominik@astro.uva.nl> @@ -2317,7 +2317,8 @@ used. Does nothing if the resulting frame is nil." (frame (set-buffer (idlwave-find-file-noselect (car frame) 'shell)) (widen) - (goto-line (nth 1 frame))))) + (goto-char (point-min)) + (forward-line (1- (nth 1 frame)))))) (defun idlwave-shell-pc-frame () "Returns the frame for IDL execution." @@ -2388,8 +2389,8 @@ matter what the settings of that variable." (set-buffer buffer) (save-restriction (widen) - (goto-line (nth 1 frame)) - (forward-line 0) + (goto-char (point-min)) + (forward-line (1- (nth 1 frame))) (setq pos (point)) (setq idlwave-shell-is-stopped t) diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index a7f033c7045..35c372d0b4b 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -15152,7 +15152,8 @@ is already shown in a buffer." (let ((buffer (get-file-buffer (car token)))) (speedbar-find-file-in-frame (car token)) (when (or vhdl-speedbar-jump-to-unit buffer) - (goto-line (cdr token)) + (goto-char (point-min)) + (forward-line (1- (cdr token))) (recenter)) (vhdl-speedbar-update-current-unit t t) (speedbar-set-timer dframe-update-speed) @@ -15170,7 +15171,8 @@ is already shown in a buffer." (let ((token (get-text-property (match-beginning 3) 'speedbar-token))) (vhdl-visit-file (car token) t - (progn (goto-line (cdr token)) + (progn (goto-char (point-min)) + (forward-line (1- (cdr token))) (end-of-line) (if is-entity (vhdl-port-copy) @@ -15919,7 +15921,8 @@ current project/directory." ;; insert component declarations (while ent-alist (vhdl-visit-file (nth 2 (car ent-alist)) nil - (progn (goto-line (nth 3 (car ent-alist))) + (progn (goto-char (point-min)) + (forward-line (1- (nth 3 (car ent-alist)))) (end-of-line) (vhdl-port-copy))) (goto-char component-pos) |