aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2006-11-26 13:49:43 +0000
committerJuanma Barranquero2006-11-26 13:49:43 +0000
commit1babb7ea23399a035cd19f9b2a8348b7f0404a60 (patch)
tree4cd6a4bf678a7bcb445e3789d739cc908674c116
parentb9b172ace737cc3d3df1af5b90e5e5a6b277bd6a (diff)
downloademacs-1babb7ea23399a035cd19f9b2a8348b7f0404a60.tar.gz
emacs-1babb7ea23399a035cd19f9b2a8348b7f0404a60.zip
(ada-which-compiler): Fix typo in docstring.
(ada-compile-goto-error): Adapt to new argument profile of compilation-goto-locus in Emacs 22. Don't check if the various compile functions are defined; we already do "(require 'compile)".
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/progmodes/ada-mode.el53
2 files changed, 29 insertions, 31 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cd461d6f304..ed6868f86db 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12006-11-26 Stephen Leake <stephen_leake@stephe-leake.org>
2
3 * progmodes/ada-mode.el (ada-which-compiler): Fix typo in docstring.
4 (ada-compile-goto-error): Adapt to new argument profile of
5 compilation-goto-locus in Emacs 22. Don't check if the various
6 compile functions are defined; we already do "(require 'compile)".
7
12006-11-26 Kim F. Storm <storm@cua.dk> 82006-11-26 Kim F. Storm <storm@cua.dk>
2 9
3 * kmacro.el: Fix commentary. 10 * kmacro.el: Fix commentary.
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index ccd91d3b060..c529e3a8265 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -27,13 +27,13 @@
27;; Boston, MA 02110-1301, USA. 27;; Boston, MA 02110-1301, USA.
28 28
29;;; Commentary: 29;;; Commentary:
30;;; This mode is a major mode for editing Ada83 and Ada95 source code. 30;;; This mode is a major mode for editing Ada code. This is a major
31;;; This is a major rewrite of the file packaged with Emacs-20. The 31;;; rewrite of the file packaged with Emacs-20. The Ada mode is
32;;; ada-mode is composed of four Lisp files, ada-mode.el, ada-xref.el, 32;;; composed of four Lisp files: ada-mode.el, ada-xref.el, ada-prj.el
33;;; ada-prj.el and ada-stmt.el. Only this file (ada-mode.el) is 33;;; and ada-stmt.el. Only this file (ada-mode.el) is completely
34;;; completely independent from the GNU Ada compiler Gnat, distributed 34;;; independent from the GNU Ada compiler GNAT, distributed by Ada
35;;; by Ada Core Technologies. All the other files rely heavily on 35;;; Core Technologies. All the other files rely heavily on features
36;;; features provided only by Gnat. 36;;; provided only by GNAT.
37;;; 37;;;
38;;; Note: this mode will not work with Emacs 19. If you are on a VMS 38;;; Note: this mode will not work with Emacs 19. If you are on a VMS
39;;; system, where the latest version of Emacs is 19.28, you will need 39;;; system, where the latest version of Emacs is 19.28, you will need
@@ -77,7 +77,7 @@
77;;; (yet) been recoded in this new mode. Perhaps you prefer sticking 77;;; (yet) been recoded in this new mode. Perhaps you prefer sticking
78;;; to his version. 78;;; to his version.
79;;; 79;;;
80;;; A complete rewrite for Emacs-20 / Gnat-3.11 has been done by Ada Core 80;;; A complete rewrite for Emacs-20 / GNAT-3.11 has been done by Ada Core
81;;; Technologies. 81;;; Technologies.
82 82
83;;; Credits: 83;;; Credits:
@@ -437,7 +437,7 @@ An example is:
437 "*Name of the compiler to use. 437 "*Name of the compiler to use.
438This will determine what features are made available through the Ada mode. 438This will determine what features are made available through the Ada mode.
439The possible choices are: 439The possible choices are:
440`gnat': Use Ada Core Technologies' Gnat compiler. Add some cross-referencing 440`gnat': Use Ada Core Technologies' GNAT compiler. Add some cross-referencing
441 features. 441 features.
442`generic': Use a generic compiler." 442`generic': Use a generic compiler."
443 :type '(choice (const gnat) 443 :type '(choice (const gnat)
@@ -794,33 +794,24 @@ the 4 file locations can be clicked on and jumped to."
794 (match-string 1)))) 794 (match-string 1))))
795 (error-pos (point-marker)) 795 (error-pos (point-marker))
796 source) 796 source)
797
798 ;; set source marker
797 (save-excursion 799 (save-excursion
798 (save-restriction 800 (compilation-find-file (point-marker) (match-string 1) "./")
799 (widen) 801 (set-buffer file)
800 ;; Use funcall so as to prevent byte-compiler warnings 802
801 ;; `ada-find-file' is not defined if ada-xref wasn't loaded. But 803 (if (stringp line)
802 ;; if we can find it, we should use it instead of 804 (goto-line (string-to-number line)))
803 ;; `compilation-find-file', since the latter doesn't know anything 805
804 ;; about source path. 806 (setq source (point-marker)))
805 807
806 (if (functionp 'ada-find-file) 808 (compilation-goto-locus error-pos source nil)
807 (setq file (funcall (symbol-function 'ada-find-file) 809
808 (match-string 1)))
809 (setq file (funcall (symbol-function 'compilation-find-file)
810 (point-marker) (match-string 1)
811 "./")))
812 (set-buffer file)
813
814 (if (stringp line)
815 (goto-line (string-to-number line)))
816 (setq source (point-marker))))
817 (funcall (symbol-function 'compilation-goto-locus)
818 (cons source error-pos))
819 )) 810 ))
820 811
821 ;; otherwise, default behavior 812 ;; otherwise, default behavior
822 (t 813 (t
823 (funcall (symbol-function 'compile-goto-error))) 814 (compile-goto-error))
824 ) 815 )
825 (recenter)) 816 (recenter))
826 817