diff options
Diffstat (limited to 'lisp/progmodes/ada-xref.el')
-rw-r--r-- | lisp/progmodes/ada-xref.el | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el index bf836b20eee..ceda645e682 100644 --- a/lisp/progmodes/ada-xref.el +++ b/lisp/progmodes/ada-xref.el @@ -1,13 +1,15 @@ ;; 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, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Free Software Foundation, Inc. ;; Author: Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de> ;; Rolf Ebert <ebert@inf.enst.fr> ;; Emmanuel Briot <briot@gnat.com> ;; Maintainer: Stephen Leake <stephen_leake@stephe-leake.org> ;; Keywords: languages ada xref +;; Package: ada-mode ;; This file is part of GNU Emacs. @@ -108,10 +110,9 @@ the Ada mode project." :type 'string :group 'ada) (defcustom ada-prj-ada-project-path-sep - (if (or (equal system-type 'windows-nt) - (equal system-type 'ms-dos)) - ";" - ":") + (cond ((boundp 'path-separator) path-separator) ; 20.3+ + ((memq system-type '(windows-nt ms-dos)) ";") + (t ":")) "Default separator for ada_project_path project variable." :type 'string :group 'ada) @@ -324,7 +325,7 @@ CROSS-PREFIX is the prefix to use for the `gnatls' command." (add-to-list 'ada-xref-runtime-library-specs-path (buffer-substring-no-properties (point) - (save-excursion (end-of-line) (point))))) + (point-at-eol)))) (forward-line 1)) ;; Object path @@ -338,7 +339,7 @@ CROSS-PREFIX is the prefix to use for the `gnatls' command." (add-to-list 'ada-xref-runtime-library-ali-path (buffer-substring-no-properties (point) - (save-excursion (end-of-line) (point))))) + (point-at-eol)))) (forward-line 1)) ) (kill-buffer nil)))) @@ -381,9 +382,9 @@ Assumes environment variable ADA_PROJECT_PATH is set properly." (forward-line 1) ; first directory in list (while (not (looking-at "^$")) ; terminate on blank line (back-to-indentation) ; skip whitespace - (if (looking-at "<Current_Directory>") - (add-to-list 'src-dir (expand-file-name ".")) - (add-to-list 'src-dir + (add-to-list 'src-dir + (if (looking-at "<Current_Directory>") + default-directory (expand-file-name (buffer-substring-no-properties (point) (line-end-position))))) @@ -395,9 +396,9 @@ Assumes environment variable ADA_PROJECT_PATH is set properly." (forward-line 1) (while (not (looking-at "^$")) (back-to-indentation) - (if (looking-at "<Current_Directory>") - (add-to-list 'obj-dir (expand-file-name ".")) - (add-to-list 'obj-dir + (add-to-list 'obj-dir + (if (looking-at "<Current_Directory>") + default-directory (expand-file-name (buffer-substring-no-properties (point) (line-end-position))))) @@ -1817,7 +1818,7 @@ Information is extracted from the ali file." (beginning-of-line) (if declaration-found (let ((current-line (buffer-substring - (point) (save-excursion (end-of-line) (point))))) + (point) (point-at-eol)))) (save-excursion (forward-line 1) (beginning-of-line) @@ -2379,5 +2380,4 @@ For instance, it creates the gnat-specific menus, sets some hooks for (provide 'ada-xref) -;; arch-tag: 415a39fe-577b-4676-b3b1-6ff6db7ca24e ;;; ada-xref.el ends here |