;; 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 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de>
;; Rolf Ebert <ebert@inf.enst.fr>
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; This Package provides a set of functions to use the output of the
(let ((file (ada-find-src-file-in-dir filename)))
(if file
(find-file file)
- (error (concat filename " not found in src_dir")))))
+ (error "%s not found in src_dir" filename))))
;; ----- Utilities -------------------------------------------------
(defun ada-convert-file-name (name)
"Convert from NAME to a name that can be used by the compilation commands.
-This is overriden on VMS to convert from VMS filenames to Unix filenames."
+This is overridden on VMS to convert from VMS filenames to Unix filenames."
name)
;; FIXME: use convert-standard-filename instead
(let (selected)
- (if (or (not (string= mode-name "Ada"))
- (not (buffer-file-name)))
+ (if (not (and (derived-mode-p 'ada-mode)
+ buffer-file-name))
;; Not in an Ada buffer, or current buffer not associated
;; with a file (for instance an emerge buffer)
;; No more idea to find the declaration. Give up
(progn
(kill-buffer ali-buffer)
- (error (concat "No declaration of " (ada-name-of identlist)
- " found."))
+
+ (error "No declaration of %s found." (ada-name-of identlist))
)))
)
;; none => error
((= len 0)
(kill-buffer (current-buffer))
- (error (concat "No declaration of "
- (ada-name-of identlist)
- " recorded in .ali file")))
-
+ (error "No declaration of %s recorded in .ali file"
+ (ada-name-of identlist)))
;; one => should be the right one
((= len 1)
(goto-line (caar declist)))
(string-to-number (nth 2 (car list)))
identlist
other-frame)
- (error (concat (caar list) " not found in src_dir")))
+ (error "%s not found in src_dir" (caar list)))
(message "This is only a (good) guess at the cross-reference.")
)
(provide 'ada-xref)
-;;; arch-tag: 415a39fe-577b-4676-b3b1-6ff6db7ca24e
+;; arch-tag: 415a39fe-577b-4676-b3b1-6ff6db7ca24e
;;; ada-xref.el ends here