;;; 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, 2010 Free Software Foundation, Inc.
;; Author: Rolf Ebert <ebert@inf.enst.fr>
;; Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de>
"Return Ada mode version."
(interactive)
(let ((version-string "4.00"))
- (if (interactive-p)
+ (if (called-interactively-p 'interactive)
(message version-string)
version-string)))
(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)
(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)))