X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/f11199dbc2e6334efde4739df386ba8709151be4..f69f4541b528957ef19f74acf95ceb56ebccc15c:/packages/ada-mode/ada-gnat-xref.el diff --git a/packages/ada-mode/ada-gnat-xref.el b/packages/ada-mode/ada-gnat-xref.el old mode 100755 new mode 100644 index 7144540ce..9accba2f3 --- a/packages/ada-mode/ada-gnat-xref.el +++ b/packages/ada-mode/ada-gnat-xref.el @@ -1,7 +1,7 @@ ;; Ada mode cross-reference functionality provided by the 'gnat xref' ;; tool. Includes related functions, such as gnatprep support. ;; -;; These tools are all Ada-specific; see gnat-inspect for +;; These tools are all Ada-specific; see gpr-query or gnat-inspect for ;; multi-language GNAT cross-reference tools. ;; ;; GNAT is provided by AdaCore; see http://libre.adacore.com/ @@ -52,7 +52,8 @@ (setq col (+ 1 col)) ) - (let* ((arg (format "%s:%s:%d:%d" identifier file line col)) + (let* ((file-non-dir (file-name-nondirectory file)) + (arg (format "%s:%s:%d:%d" identifier file-non-dir line col)) (switches (concat "-a" (when (ada-prj-get 'gpr_ext) (concat "--ext=" (ada-prj-get 'gpr_ext))))) @@ -80,7 +81,7 @@ (found-col (string-to-number (match-string 3)))) (if (not (and - (equal file found-file) + (equal file-non-dir found-file) (= line found-line) (= col found-col))) ;; found other item @@ -89,7 +90,6 @@ )) (when (eobp) - (pop-to-buffer (current-buffer)) (error "gnat find did not return other item")) )) result)) @@ -135,7 +135,6 @@ (forward-line 1))) ) (when (eobp) - (pop-to-buffer (current-buffer)) (error "gnat find did not return parent types")) )) @@ -176,6 +175,7 @@ (setq ada-make-package-body 'ada-gnat-make-package-body) (add-hook 'ada-syntax-propertize-hook 'gnatprep-syntax-propertize) + (add-hook 'ada-syntax-propertize-hook 'ada-gnat-syntax-propertize) ;; must be after indentation engine setup, because that resets the ;; indent function list. @@ -184,6 +184,7 @@ (setq ada-xref-other-function 'ada-gnat-xref-other) (setq ada-xref-parent-function 'ada-gnat-xref-parents) (setq ada-xref-all-function 'ada-gnat-xref-all) + (setq ada-show-xref-tool-buffer 'ada-gnat-show-run-buffer) ;; gnatmake -gnatD generates files with .dg extensions. But we don't ;; need to navigate between them. @@ -200,11 +201,13 @@ (setq ada-make-package-body nil) (setq ada-syntax-propertize-hook (delq 'gnatprep-syntax-propertize ada-syntax-propertize-hook)) + (setq ada-syntax-propertize-hook (delq 'ada-gnat-syntax-propertize ada-syntax-propertize-hook)) (setq ada-mode-hook (delq 'ada-gnat-xref-setup ada-mode-hook)) (setq ada-xref-other-function nil) (setq ada-xref-parent-function nil) (setq ada-xref-all-function nil) + (setq ada-show-xref-tool-buffer nil) (setq completion-ignored-extensions (delete ".ali" completion-ignored-extensions)) (setq compilation-error-regexp-alist (delete 'gnat compilation-error-regexp-alist))