;; ada-xref.el --- for lookup and completion in Ada mode
-;; Copyright (C) 1994-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1994-2016 Free Software Foundation, Inc.
;; Author: Markus Heritsch <Markus.Heritsch@studbox.uni-stuttgart.de>
;; Rolf Ebert <ebert@inf.enst.fr>
:type 'boolean :group 'ada)
(defcustom ada-xref-search-with-egrep t
- "If non-nil, use egrep to find the possible declarations for an entity.
+ "If non-nil, use grep -E to find the possible declarations for an entity.
This alternate method is used when the exact location was not found in the
information provided by GNAT. However, it might be expensive if you have a lot
of sources, since it will search in all the files in your project."
"Associative list of project files with properties.
It has the format: (project project ...)
A project has the format: (project-file . project-plist)
-\(See 'apropos plist' for operations on property lists).
+\(See `apropos plist' for operations on property lists).
See `ada-default-prj-properties' for the list of valid properties.
The current project is retrieved with `ada-xref-current-project'.
Properties are retrieved with `ada-xref-get-project-field', set with
(ada-find-file-in-dir (concat exec-name ".exe") exec-path))))
(if result
result
- (error "'%s' not found in path" exec-name))))
+ (error "`%s' not found in path" exec-name))))
(defun ada-initialize-runtime-library (cross-prefix)
"Initialize the variables for the runtime library location.
file, minus extension but with directory, and ${full_current} is
replaced by the name including the extension."
- (while (string-match "\\(-[^-\$IO]*[IO]\\)?\${\\([^}]+\\)}" cmd-string)
+ (while (string-match "\\(-[^-$IO]*[IO]\\)?${\\([^}]+\\)}" cmd-string)
(let (value
(name (match-string 2 cmd-string)))
(cond
`ada-prj-file-extension' (default .adp). If not found, search for *.adp
in the current directory; if several are found, and NO-USER-QUESTION
is non-nil, prompt the user to select one. If none are found, return
-'default.adp'."
+\"default.adp\"."
(let (selected)
(append (mapcar 'directory-file-name compilation-search-path)
ada-search-directories))
- ;; return 't', for decent display in message buffer when called interactively
+ ;; return t, for decent display in message buffer when called interactively
t)
(defun ada-find-references (&optional pos arg local-only)
(concat "^" (ada-line-of identlist)
"." (ada-column-of identlist)
"[ *]" (ada-name-of identlist)
- "[{\[\(<= ]?\\(.*\\)$") bound t))
+ "[{[(<= ]?\\(.*\\)$") bound t))
(if declaration-found
(ada-set-on-declaration identlist t))
))
(concat
"^[0-9]+.[0-9]+[ *]"
(ada-name-of identlist)
- "[ <{=\(\[]\\(.\\|\n\\.\\)*\\<"
+ "[ <{=([]\\(.\\|\n\\.\\)*\\<"
(ada-line-of identlist)
"[^0-9]"
(ada-column-of identlist) "\\>")
(forward-line -1)
(beginning-of-line))
(unless (looking-at (concat "[0-9]+.[0-9]+[ *]"
- (ada-name-of identlist) "[ <{=\(\[]"))
+ (ada-name-of identlist) "[ <{=([]"))
(setq declaration-found nil))))
;; Still no success ! The ali file must be too old, and we need to
exist.
This function attempts to find the possible declarations for the identifier
anywhere in the object path.
-This command requires the external `egrep' program to be available.
+This command requires the external `grep' program to be available.
This works well when one is using an external library and wants to find
the declaration and documentation of the subprograms one is using."