aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2003-05-04 19:55:38 +0000
committerJuanma Barranquero2003-05-04 19:55:38 +0000
commit6f9a2614e7246fa7a1ff8ec7eb40db4d65e160a8 (patch)
tree1e3e6f89acd2e543b3397048df3d9b9c7caa7bf2
parent7abe197c30f1f47116af9c097295d79540f7a445 (diff)
downloademacs-6f9a2614e7246fa7a1ff8ec7eb40db4d65e160a8.tar.gz
emacs-6f9a2614e7246fa7a1ff8ec7eb40db4d65e160a8.zip
(ada-xemacs): Variable removed, since it's better to use (featurep 'xemacs).
Removed warnings generated with Emacs 21.3.x (mostly by adding needed `require' statements).
-rw-r--r--lisp/progmodes/ada-mode.el135
-rw-r--r--lisp/progmodes/ada-prj.el13
-rw-r--r--lisp/progmodes/ada-stmt.el8
3 files changed, 80 insertions, 76 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index 0ae30d74703..e9fd8c06cc3 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -126,6 +126,12 @@
126;;; `abbrev-mode': Provides the capability to define abbreviations, which 126;;; `abbrev-mode': Provides the capability to define abbreviations, which
127;;; are automatically expanded when you type them. See the Emacs manual. 127;;; are automatically expanded when you type them. See the Emacs manual.
128 128
129(eval-when-compile
130 (require 'ispell nil t)
131 (require 'find-file nil t)
132 (require 'align nil t)
133 (require 'which-func nil t)
134 (require 'compile nil t))
129 135
130;; this function is needed at compile time 136;; this function is needed at compile time
131(eval-and-compile 137(eval-and-compile
@@ -141,16 +147,6 @@ If IS-XEMACS is non-nil, check for XEmacs instead of Emacs."
141 (>= emacs-minor-version minor))))))) 147 (>= emacs-minor-version minor)))))))
142 148
143 149
144;; We create a constant for that, for efficiency only
145;; This should be evaluated both at compile time, only a runtime
146(eval-and-compile
147 (defconst ada-xemacs (and (boundp 'running-xemacs)
148 (symbol-value 'running-xemacs))
149 "Return t if we are using XEmacs."))
150
151(eval-and-compile
152 (condition-case nil (require 'find-file) (error nil)))
153
154;; This call should not be made in the release that is done for the 150;; This call should not be made in the release that is done for the
155;; official Emacs, since it does nothing useful for the latest version 151;; official Emacs, since it does nothing useful for the latest version
156;;(if (not (ada-check-emacs-version 21 1)) 152;;(if (not (ada-check-emacs-version 21 1))
@@ -381,15 +377,20 @@ If nil, no contextual menu is available."
381 '("/usr/adainclude" "/usr/local/adainclude" 377 '("/usr/adainclude" "/usr/local/adainclude"
382 "/opt/gnu/adainclude")) 378 "/opt/gnu/adainclude"))
383 "*List of directories to search for Ada files. 379 "*List of directories to search for Ada files.
384See the description for the `ff-search-directories' variable. 380See the description for the `ff-search-directories' variable. This variable
385Emacs will automatically add the paths defined in your project file, and if you 381is the initial value of this variable, and is copied and modified in
386are using the GNAT compiler the output of the gnatls command to find where the 382`ada-search-directories-internal'."
387runtime really is."
388 :type '(repeat (choice :tag "Directory" 383 :type '(repeat (choice :tag "Directory"
389 (const :tag "default" nil) 384 (const :tag "default" nil)
390 (directory :format "%v"))) 385 (directory :format "%v")))
391 :group 'ada) 386 :group 'ada)
392 387
388(defvar ada-search-directories-internal ada-search-directories
389 "Internal version of `ada-search-directories'.
390Its value is the concatenation of the search path as read in the project file
391and the standard runtime location, and the value of the user-defined
392ada-search-directories.")
393
393(defcustom ada-stmt-end-indent 0 394(defcustom ada-stmt-end-indent 0
394 "*Number of columns to indent the end of a statement on a separate line. 395 "*Number of columns to indent the end of a statement on a separate line.
395 396
@@ -850,7 +851,7 @@ declares it as a word constituent."
850 851
851 ;; See the comment above on grammar related function for the special 852 ;; See the comment above on grammar related function for the special
852 ;; setup for '#'. 853 ;; setup for '#'.
853 (if ada-xemacs 854 (if (featurep 'xemacs)
854 (modify-syntax-entry ?# "<" ada-mode-syntax-table) 855 (modify-syntax-entry ?# "<" ada-mode-syntax-table)
855 (modify-syntax-entry ?# "$" ada-mode-syntax-table)) 856 (modify-syntax-entry ?# "$" ada-mode-syntax-table))
856 857
@@ -872,7 +873,7 @@ declares it as a word constituent."
872;; Support of special characters in XEmacs (see the comments at the beginning 873;; Support of special characters in XEmacs (see the comments at the beginning
873;; of the section on Grammar related functions). 874;; of the section on Grammar related functions).
874 875
875(if ada-xemacs 876(if (featurep 'xemacs)
876 (defadvice parse-partial-sexp (around parse-partial-sexp-protect-constants) 877 (defadvice parse-partial-sexp (around parse-partial-sexp-protect-constants)
877 "Handles special character constants and gnatprep statements." 878 "Handles special character constants and gnatprep statements."
878 (let (change) 879 (let (change)
@@ -927,7 +928,6 @@ as numbers instead of gnatprep comments."
927 ;; Setting this only if font-lock is not set won't work 928 ;; Setting this only if font-lock is not set won't work
928 ;; if the user activates or deactivates font-lock-mode, 929 ;; if the user activates or deactivates font-lock-mode,
929 ;; but will make things faster most of the time 930 ;; but will make things faster most of the time
930 (make-local-hook 'after-change-functions)
931 (add-hook 'after-change-functions 'ada-after-change-function nil t) 931 (add-hook 'after-change-functions 'ada-after-change-function nil t)
932 ))) 932 )))
933 933
@@ -1071,7 +1071,7 @@ name"
1071;;;###autoload 1071;;;###autoload
1072(defun ada-mode () 1072(defun ada-mode ()
1073 "Ada mode is the major mode for editing Ada code. 1073 "Ada mode is the major mode for editing Ada code.
1074This version was built on $Date: 2003/01/31 09:21:42 $. 1074This version was built on $Date: 2003/05/04 13:55:51 $.
1075 1075
1076Bindings are as follows: (Note: 'LFD' is control-j.) 1076Bindings are as follows: (Note: 'LFD' is control-j.)
1077\\{ada-mode-map} 1077\\{ada-mode-map}
@@ -1148,7 +1148,7 @@ If you use ada-xref.el:
1148 ;; Emacs 20.3 defines a comment-padding to insert spaces between 1148 ;; Emacs 20.3 defines a comment-padding to insert spaces between
1149 ;; the comment and the text. We do not want any, this is already 1149 ;; the comment and the text. We do not want any, this is already
1150 ;; included in comment-start 1150 ;; included in comment-start
1151 (unless ada-xemacs 1151 (unless (featurep 'xemacs)
1152 (progn 1152 (progn
1153 (if (ada-check-emacs-version 20 3) 1153 (if (ada-check-emacs-version 20 3)
1154 (progn 1154 (progn
@@ -1184,7 +1184,7 @@ If you use ada-xref.el:
1184 ;; We need to set some properties for XEmacs, and define some variables 1184 ;; We need to set some properties for XEmacs, and define some variables
1185 ;; for Emacs 1185 ;; for Emacs
1186 1186
1187 (if ada-xemacs 1187 (if (featurep 'xemacs)
1188 ;; XEmacs 1188 ;; XEmacs
1189 (put 'ada-mode 'font-lock-defaults 1189 (put 'ada-mode 'font-lock-defaults
1190 '(ada-font-lock-keywords 1190 '(ada-font-lock-keywords
@@ -1202,10 +1202,10 @@ If you use ada-xref.el:
1202 (set (make-local-variable 'ff-other-file-alist) 1202 (set (make-local-variable 'ff-other-file-alist)
1203 'ada-other-file-alist) 1203 'ada-other-file-alist)
1204 (set (make-local-variable 'ff-search-directories) 1204 (set (make-local-variable 'ff-search-directories)
1205 'ada-search-directories) 1205 'ada-search-directories-internal)
1206 (setq ff-post-load-hooks 'ada-set-point-accordingly 1206 (setq ff-post-load-hook 'ada-set-point-accordingly
1207 ff-file-created-hooks 'ada-make-body) 1207 ff-file-created-hook 'ada-make-body)
1208 (add-hook 'ff-pre-load-hooks 'ada-which-function-are-we-in) 1208 (add-hook 'ff-pre-load-hook 'ada-which-function-are-we-in)
1209 1209
1210 ;; Some special constructs for find-file.el 1210 ;; Some special constructs for find-file.el
1211 ;; We do not need to add the construction for 'with', which is in the 1211 ;; We do not need to add the construction for 'with', which is in the
@@ -1219,21 +1219,26 @@ If you use ada-xref.el:
1219 "\\(body[ \t]+\\)?" 1219 "\\(body[ \t]+\\)?"
1220 "\\(\\(\\sw\\|[_.]\\)+\\)\\.\\(\\sw\\|_\\)+[ \t\n]+is")) 1220 "\\(\\(\\sw\\|[_.]\\)+\\)\\.\\(\\sw\\|_\\)+[ \t\n]+is"))
1221 (lambda () 1221 (lambda ()
1222 (set 'fname (ff-get-file 1222 (if (fboundp 'ff-get-file)
1223 ada-search-directories 1223 (if (boundp 'fname)
1224 (ada-make-filename-from-adaname 1224 (set 'fname (ff-get-file
1225 (match-string 3)) 1225 ada-search-directories-internal
1226 ada-spec-suffixes))))) 1226 (ada-make-filename-from-adaname
1227 (match-string 3))
1228 ada-spec-suffixes)))))))
1227 ;; Another special construct for find-file.el : when in a separate clause, 1229 ;; Another special construct for find-file.el : when in a separate clause,
1228 ;; go to the correct package. 1230 ;; go to the correct package.
1229 (add-to-list 'ff-special-constructs 1231 (add-to-list 'ff-special-constructs
1230 (cons "^separate[ \t\n]*(\\(\\(\\sw\\|[_.]\\)+\\))" 1232 (cons "^separate[ \t\n]*(\\(\\(\\sw\\|[_.]\\)+\\))"
1231 (lambda () 1233 (lambda ()
1232 (set 'fname (ff-get-file 1234 (if (fboundp 'ff-get-file)
1233 ada-search-directories 1235 (if (boundp 'fname)
1234 (ada-make-filename-from-adaname 1236 (setq fname (ff-get-file
1235 (match-string 1)) 1237 ada-search-directories-internal
1236 ada-spec-suffixes))))) 1238 (ada-make-filename-from-adaname
1239 (match-string 1))
1240 ada-spec-suffixes)))))))
1241
1237 ;; Another special construct, that redefines the one in find-file.el. The 1242 ;; Another special construct, that redefines the one in find-file.el. The
1238 ;; old one can handle only one possible type of extension for Ada files 1243 ;; old one can handle only one possible type of extension for Ada files
1239 ;; remove from the list the standard "with..." that is put by find-file.el, 1244 ;; remove from the list the standard "with..." that is put by find-file.el,
@@ -1244,11 +1249,13 @@ If you use ada-xref.el:
1244 (assoc "^with[ \t]+\\([a-zA-Z0-9_\\.]+\\)" ff-special-constructs)) 1249 (assoc "^with[ \t]+\\([a-zA-Z0-9_\\.]+\\)" ff-special-constructs))
1245 (new-cdr 1250 (new-cdr
1246 (lambda () 1251 (lambda ()
1247 (set 'fname (ff-get-file 1252 (if (fboundp 'ff-get-file)
1248 ada-search-directories 1253 (if (boundp 'fname)
1249 (ada-make-filename-from-adaname 1254 (set 'fname (ff-get-file
1250 (match-string 1)) 1255 ada-search-directories-internal
1251 ada-spec-suffixes))))) 1256 (ada-make-filename-from-adaname
1257 (match-string 1))
1258 ada-spec-suffixes)))))))
1252 (if old-construct 1259 (if old-construct
1253 (setcdr old-construct new-cdr) 1260 (setcdr old-construct new-cdr)
1254 (add-to-list 'ff-special-constructs 1261 (add-to-list 'ff-special-constructs
@@ -1335,7 +1342,7 @@ If you use ada-xref.el:
1335 ;; Fix is: redefine a new function ada-which-function, and call it when the 1342 ;; Fix is: redefine a new function ada-which-function, and call it when the
1336 ;; major-mode is ada-mode. 1343 ;; major-mode is ada-mode.
1337 1344
1338 (unless ada-xemacs 1345 (unless (featurep 'xemacs)
1339 ;; This function do not require that we load which-func now. 1346 ;; This function do not require that we load which-func now.
1340 ;; This can be done by the user if he decides to use which-func-mode 1347 ;; This can be done by the user if he decides to use which-func-mode
1341 1348
@@ -1384,10 +1391,9 @@ use imenu."
1384 ;; Run this after the hook to give the users a chance to activate 1391 ;; Run this after the hook to give the users a chance to activate
1385 ;; font-lock-mode 1392 ;; font-lock-mode
1386 1393
1387 (unless ada-xemacs 1394 (unless (featurep 'xemacs)
1388 (progn 1395 (progn
1389 (ada-initialize-properties) 1396 (ada-initialize-properties)
1390 (make-local-hook 'font-lock-mode-hook)
1391 (add-hook 'font-lock-mode-hook 'ada-deactivate-properties nil t))) 1397 (add-hook 'font-lock-mode-hook 'ada-deactivate-properties nil t)))
1392 1398
1393 ;; the following has to be done after running the ada-mode-hook 1399 ;; the following has to be done after running the ada-mode-hook
@@ -1406,8 +1412,8 @@ use imenu."
1406;; transient-mark-mode and mark-active are not defined in XEmacs 1412;; transient-mark-mode and mark-active are not defined in XEmacs
1407(defun ada-region-selected () 1413(defun ada-region-selected ()
1408 "t if a region has been selected by the user and is still active." 1414 "t if a region has been selected by the user and is still active."
1409 (or (and ada-xemacs (funcall (symbol-function 'region-active-p))) 1415 (or (and (featurep 'xemacs) (funcall (symbol-function 'region-active-p)))
1410 (and (not ada-xemacs) 1416 (and (not (featurep 'xemacs))
1411 (symbol-value 'transient-mark-mode) 1417 (symbol-value 'transient-mark-mode)
1412 (symbol-value 'mark-active)))) 1418 (symbol-value 'mark-active))))
1413 1419
@@ -2240,7 +2246,7 @@ offset."
2240 2246
2241 ;; This need to be done here so that the advice is not always 2247 ;; This need to be done here so that the advice is not always
2242 ;; activated (this might interact badly with other modes) 2248 ;; activated (this might interact badly with other modes)
2243 (if ada-xemacs 2249 (if (featurep 'xemacs)
2244 (ad-activate 'parse-partial-sexp t)) 2250 (ad-activate 'parse-partial-sexp t))
2245 2251
2246 (save-excursion 2252 (save-excursion
@@ -2287,7 +2293,7 @@ offset."
2287 2293
2288 ;; restore syntax-table 2294 ;; restore syntax-table
2289 (set-syntax-table previous-syntax-table) 2295 (set-syntax-table previous-syntax-table)
2290 (if ada-xemacs 2296 (if (featurep 'xemacs)
2291 (ad-deactivate 'parse-partial-sexp)) 2297 (ad-deactivate 'parse-partial-sexp))
2292 ) 2298 )
2293 2299
@@ -3557,7 +3563,7 @@ If NOERROR is non-nil, it only returns nil if no match was found."
3557 ;; "begin" we encounter. 3563 ;; "begin" we encounter.
3558 (first (not recursive)) 3564 (first (not recursive))
3559 (count-generic nil) 3565 (count-generic nil)
3560 (stop-at-when nil) 3566 (stop-at-when nil)
3561 ) 3567 )
3562 3568
3563 ;; Ignore "when" most of the time, except if we are looking at the 3569 ;; Ignore "when" most of the time, except if we are looking at the
@@ -4005,7 +4011,7 @@ Point is moved at the beginning of the search-re."
4005 ;; If inside a string, skip it (and the following comments) 4011 ;; If inside a string, skip it (and the following comments)
4006 ;; 4012 ;;
4007 ((ada-in-string-p parse-result) 4013 ((ada-in-string-p parse-result)
4008 (if ada-xemacs 4014 (if (featurep 'xemacs)
4009 (search-backward "\"" nil t) 4015 (search-backward "\"" nil t)
4010 (goto-char (nth 8 parse-result))) 4016 (goto-char (nth 8 parse-result)))
4011 (unless backward (forward-sexp 1))) 4017 (unless backward (forward-sexp 1)))
@@ -4014,7 +4020,7 @@ Point is moved at the beginning of the search-re."
4014 ;; There is a special code for comments at the end of the file 4020 ;; There is a special code for comments at the end of the file
4015 ;; 4021 ;;
4016 ((ada-in-comment-p parse-result) 4022 ((ada-in-comment-p parse-result)
4017 (if ada-xemacs 4023 (if (featurep 'xemacs)
4018 (progn 4024 (progn
4019 (forward-line 1) 4025 (forward-line 1)
4020 (beginning-of-line) 4026 (beginning-of-line)
@@ -4489,7 +4495,7 @@ Moves to 'begin' if in a declarative part."
4489 (define-key ada-mode-map "\t" 'ada-tab) 4495 (define-key ada-mode-map "\t" 'ada-tab)
4490 (define-key ada-mode-map "\C-c\t" 'ada-justified-indent-current) 4496 (define-key ada-mode-map "\C-c\t" 'ada-justified-indent-current)
4491 (define-key ada-mode-map "\C-c\C-l" 'ada-indent-region) 4497 (define-key ada-mode-map "\C-c\C-l" 'ada-indent-region)
4492 (if ada-xemacs 4498 (if (featurep 'xemacs)
4493 (define-key ada-mode-map '(shift tab) 'ada-untab) 4499 (define-key ada-mode-map '(shift tab) 'ada-untab)
4494 (define-key ada-mode-map [(shift tab)] 'ada-untab)) 4500 (define-key ada-mode-map [(shift tab)] 'ada-untab))
4495 (define-key ada-mode-map "\C-c\C-f" 'ada-format-paramlist) 4501 (define-key ada-mode-map "\C-c\C-f" 'ada-format-paramlist)
@@ -4528,7 +4534,7 @@ Moves to 'begin' if in a declarative part."
4528 ;; The following keys are bound to functions defined in ada-xref.el or 4534 ;; The following keys are bound to functions defined in ada-xref.el or
4529 ;; ada-prj,el., However, RMS rightly thinks that the code should be shared, 4535 ;; ada-prj,el., However, RMS rightly thinks that the code should be shared,
4530 ;; and activated only if the right compiler is used 4536 ;; and activated only if the right compiler is used
4531 (if ada-xemacs 4537 (if (featurep 'xemacs)
4532 (progn 4538 (progn
4533 (define-key ada-mode-map '(shift button3) 'ada-point-and-xref) 4539 (define-key ada-mode-map '(shift button3) 'ada-point-and-xref)
4534 (define-key ada-mode-map '(control tab) 'ada-complete-identifier)) 4540 (define-key ada-mode-map '(control tab) 'ada-complete-identifier))
@@ -4661,8 +4667,8 @@ Moves to 'begin' if in a declarative part."
4661 ["Previous Package" ada-previous-package t] 4667 ["Previous Package" ada-previous-package t]
4662 ["Next Package" ada-next-package t] 4668 ["Next Package" ada-next-package t]
4663 ["Previous Procedure" ada-previous-procedure t] 4669 ["Previous Procedure" ada-previous-procedure t]
4664 ["Next Procedure" ada-next-procedure t] 4670 ["Next Procedure" ada-next-procedure t]
4665 ["Goto Start Of Statement" ada-move-to-start t] 4671 ["Goto Start Of Statement" ada-move-to-start t]
4666 ["Goto End Of Statement" ada-move-to-end t] 4672 ["Goto End Of Statement" ada-move-to-end t]
4667 ["-" nil nil] 4673 ["-" nil nil]
4668 ["Other File" ff-find-other-file t] 4674 ["Other File" ff-find-other-file t]
@@ -4690,8 +4696,8 @@ Moves to 'begin' if in a declarative part."
4690 ["---" nil nil] 4696 ["---" nil nil]
4691 ["Adjust Case Selection" ada-adjust-case-region t] 4697 ["Adjust Case Selection" ada-adjust-case-region t]
4692 ["Adjust Case in File" ada-adjust-case-buffer t] 4698 ["Adjust Case in File" ada-adjust-case-buffer t]
4693 ["Create Case Exception" ada-create-case-exception t] 4699 ["Create Case Exception" ada-create-case-exception t]
4694 ["Create Case Exception Substring" 4700 ["Create Case Exception Substring"
4695 ada-create-case-exception-substring t] 4701 ada-create-case-exception-substring t]
4696 ["Reload Case Exceptions" ada-case-read-exceptions t] 4702 ["Reload Case Exceptions" ada-case-read-exceptions t]
4697 ["----" nil nil] 4703 ["----" nil nil]
@@ -4740,13 +4746,12 @@ Moves to 'begin' if in a declarative part."
4740 ["When" ada-when t]) 4746 ["When" ada-when t])
4741 ))) 4747 )))
4742 4748
4743; (autoload 'easy-menu-define "easymenu")
4744 (easy-menu-define ada-mode-menu ada-mode-map "Menu keymap for Ada mode" m) 4749 (easy-menu-define ada-mode-menu ada-mode-map "Menu keymap for Ada mode" m)
4745 (easy-menu-add ada-mode-menu ada-mode-map) 4750 (easy-menu-add ada-mode-menu ada-mode-map)
4746 (when ada-xemacs 4751 (if (featurep 'xemacs)
4747 ;; This looks bogus to me! -stef 4752 (progn
4748 (define-key ada-mode-map [menu-bar] ada-mode-menu) 4753 (define-key ada-mode-map [menu-bar] ada-mode-menu)
4749 (set 'mode-popup-menu (cons "Ada mode" ada-mode-menu))))) 4754 (set 'mode-popup-menu (cons "Ada mode" ada-mode-menu))))))
4750 4755
4751 4756
4752;; ------------------------------------------------------- 4757;; -------------------------------------------------------
@@ -4778,7 +4783,7 @@ Moves to 'begin' if in a declarative part."
4778 4783
4779 ;; This advice is not needed anymore with Emacs21. However, for older 4784 ;; This advice is not needed anymore with Emacs21. However, for older
4780 ;; versions, as well as for XEmacs, we still need to enable it. 4785 ;; versions, as well as for XEmacs, we still need to enable it.
4781 (if (or (<= emacs-major-version 20) ada-xemacs) 4786 (if (or (<= emacs-major-version 20) (featurep 'xemacs))
4782 (progn 4787 (progn
4783 (ad-activate 'comment-region) 4788 (ad-activate 'comment-region)
4784 (comment-region beg end (- (or arg 2))) 4789 (comment-region beg end (- (or arg 2)))
@@ -4883,7 +4888,7 @@ The paragraph is indented on the first line."
4883 4888
4884 ;; In Emacs <= 20.2 and XEmacs <=20.4, there is a bug, and a newline is 4889 ;; In Emacs <= 20.2 and XEmacs <=20.4, there is a bug, and a newline is
4885 ;; inserted at the end. Delete it 4890 ;; inserted at the end. Delete it
4886 (if (or ada-xemacs 4891 (if (or (featurep 'xemacs)
4887 (<= emacs-major-version 19) 4892 (<= emacs-major-version 19)
4888 (and (= emacs-major-version 20) 4893 (and (= emacs-major-version 20)
4889 (<= emacs-minor-version 2))) 4894 (<= emacs-minor-version 2)))
@@ -4962,7 +4967,7 @@ otherwise."
4962 ;; If we are using project file, search for the other file in all 4967 ;; If we are using project file, search for the other file in all
4963 ;; the possible src directories. 4968 ;; the possible src directories.
4964 4969
4965 (if (functionp 'ada-find-src-file-in-dir) 4970 (if (fboundp 'ada-find-src-file-in-dir)
4966 (let ((other 4971 (let ((other
4967 (ada-find-src-file-in-dir 4972 (ada-find-src-file-in-dir
4968 (file-name-nondirectory (concat name (car suffixes)))))) 4973 (file-name-nondirectory (concat name (car suffixes))))))
@@ -5101,8 +5106,8 @@ Returns nil if no body was found."
5101 (setq suffixes (cdr suffixes)))) 5106 (setq suffixes (cdr suffixes))))
5102 5107
5103 ;; If find-file.el was available, use its functions 5108 ;; If find-file.el was available, use its functions
5104 (if (functionp 'ff-get-file) 5109 (if (fboundp 'ff-get-file-name)
5105 (ff-get-file-name ada-search-directories 5110 (ff-get-file-name ada-search-directories-internal
5106 (ada-make-filename-from-adaname 5111 (ada-make-filename-from-adaname
5107 (file-name-nondirectory 5112 (file-name-nondirectory
5108 (file-name-sans-extension spec-name))) 5113 (file-name-sans-extension spec-name)))
diff --git a/lisp/progmodes/ada-prj.el b/lisp/progmodes/ada-prj.el
index 40bd382a34d..6962ecb439d 100644
--- a/lisp/progmodes/ada-prj.el
+++ b/lisp/progmodes/ada-prj.el
@@ -3,7 +3,7 @@
3;; Copyright (C) 1998, 99, 2000-2003 Free Software Foundation, Inc. 3;; Copyright (C) 1998, 99, 2000-2003 Free Software Foundation, Inc.
4 4
5;; Author: Emmanuel Briot <briot@gnat.com> 5;; Author: Emmanuel Briot <briot@gnat.com>
6;; Ada Core Technologies's version: $Revision: 1.60 $ 6;; Ada Core Technologies's version: $Revision: 1.61 $
7;; Keywords: languages, ada, project file 7;; Keywords: languages, ada, project file
8 8
9;; This file is part of GNU Emacs. 9;; This file is part of GNU Emacs.
@@ -38,19 +38,20 @@
38 38
39;; ----- Requirements ----------------------------------------------------- 39;; ----- Requirements -----------------------------------------------------
40 40
41(eval-when-compile
42 (require 'ada-mode))
43(require 'cus-edit) 41(require 'cus-edit)
44(require 'ada-xref) 42(require 'ada-xref)
45 43
44(eval-when-compile
45 (require 'ada-mode))
46
46;; ----- Buffer local variables ------------------------------------------- 47;; ----- Buffer local variables -------------------------------------------
47 48
48(defvar ada-prj-current-values nil 49(defvar ada-prj-current-values nil
49 "Hold the current value of the fields; this is a property list.") 50 "Hold the current value of the fields, This is a property list.")
50(make-variable-buffer-local 'ada-prj-current-values) 51(make-variable-buffer-local 'ada-prj-current-values)
51 52
52(defvar ada-prj-default-values nil 53(defvar ada-prj-default-values nil
53 "Hold the default value for the fields; this is a property list.") 54 "Hold the default value for the fields, This is a property list.")
54(make-variable-buffer-local 'ada-prj-default-values) 55(make-variable-buffer-local 'ada-prj-default-values)
55 56
56(defvar ada-prj-ada-buffer nil 57(defvar ada-prj-ada-buffer nil
@@ -245,7 +246,7 @@ The current buffer must be the project editing buffer."
245 (erase-buffer)) 246 (erase-buffer))
246 247
247 ;; Widget support in Emacs 21 requires that we clear the buffer first 248 ;; Widget support in Emacs 21 requires that we clear the buffer first
248 (if (and (not ada-xemacs) (>= emacs-major-version 21)) 249 (if (and (not (featurep 'xemacs)) (>= emacs-major-version 21))
249 (progn 250 (progn
250 (setq widget-field-new nil 251 (setq widget-field-new nil
251 widget-field-list nil) 252 widget-field-list nil)
diff --git a/lisp/progmodes/ada-stmt.el b/lisp/progmodes/ada-stmt.el
index 325602b56c8..bb6d54a49cc 100644
--- a/lisp/progmodes/ada-stmt.el
+++ b/lisp/progmodes/ada-stmt.el
@@ -3,7 +3,7 @@
3;; Copyright(C) 1987, 93, 94, 96, 97, 98, 99, 2000 3;; Copyright(C) 1987, 93, 94, 96, 97, 98, 99, 2000
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Ada Core Technologies's version: $Revision: 1.22 $ 6;; Ada Core Technologies's version: $Revision: 1.23 $
7 7
8;; This file is part of GNU Emacs. 8;; This file is part of GNU Emacs.
9 9
@@ -61,11 +61,9 @@
61 61
62;;; Code: 62;;; Code:
63 63
64(eval-when-compile 64(require 'skeleton nil t)
65 (condition-case nil (require 'skeleton)
66 (error nil)))
67
68(require 'easymenu) 65(require 'easymenu)
66(require 'ada-mode)
69 67
70(defun ada-func-or-proc-name () 68(defun ada-func-or-proc-name ()
71 ;; Get the name of the current function or procedure." 69 ;; Get the name of the current function or procedure."