diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2006-07-29 09:59:12 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2006-07-29 09:59:12 +0000 |
commit | 251bc578cc636223d618d06cf2a2bb7d07db9cce (patch) | |
tree | 58e1c6b0a35bb4a77e6cb77876e4bc6a9d3f2ab2 /lisp/progmodes/ada-mode.el | |
parent | 99715bbc447eb633e45ffa23b87284771ce3ac74 (diff) | |
parent | 0ed0527cb02180a50f6744086ce3a487740c73e4 (diff) | |
download | emacs-251bc578cc636223d618d06cf2a2bb7d07db9cce.tar.gz emacs-251bc578cc636223d618d06cf2a2bb7d07db9cce.tar.bz2 emacs-251bc578cc636223d618d06cf2a2bb7d07db9cce.zip |
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-351
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-352
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-353
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-354
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-355
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-356
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-357
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-358
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-359
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-360
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-361
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-362
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-363
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-364
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-365
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-366
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-367
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-368
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-369
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-370
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-115
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-116
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-117
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-118
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-119
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-120
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-573
Diffstat (limited to 'lisp/progmodes/ada-mode.el')
-rw-r--r-- | lisp/progmodes/ada-mode.el | 82 |
1 files changed, 29 insertions, 53 deletions
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 9dc74264da8..bc00d859c2d 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -1208,60 +1208,36 @@ If you use ada-xref.el: ff-file-created-hook 'ada-make-body) (add-hook 'ff-pre-load-hook 'ada-which-function-are-we-in) - ;; Some special constructs for find-file.el - ;; We do not need to add the construction for 'with', which is in the - ;; standard find-file.el + ;; Some special constructs for find-file.el. (make-local-variable 'ff-special-constructs) - - ;; Go to the parent package : - (add-to-list 'ff-special-constructs - (cons (eval-when-compile - (concat "^\\(private[ \t]\\)?[ \t]*package[ \t]+" - "\\(body[ \t]+\\)?" - "\\(\\(\\sw\\|[_.]\\)+\\)\\.\\(\\sw\\|_\\)+[ \t\n]+is")) - (lambda () - (if (fboundp 'ff-get-file) - (if (boundp 'fname) - (set 'fname (ff-get-file - ada-search-directories-internal - (ada-make-filename-from-adaname - (match-string 3)) - ada-spec-suffixes))))))) - ;; Another special construct for find-file.el : when in a separate clause, - ;; go to the correct package. - (add-to-list 'ff-special-constructs - (cons "^separate[ \t\n]*(\\(\\(\\sw\\|[_.]\\)+\\))" - (lambda () - (if (fboundp 'ff-get-file) - (if (boundp 'fname) - (setq fname (ff-get-file - ada-search-directories-internal - (ada-make-filename-from-adaname - (match-string 1)) - ada-spec-suffixes))))))) - - ;; Another special construct, that redefines the one in find-file.el. The - ;; old one can handle only one possible type of extension for Ada files - ;; remove from the list the standard "with..." that is put by find-file.el, - ;; since it uses the old ada-spec-suffix variable - ;; This one needs to replace the standard one defined in find-file.el (with - ;; Emacs <= 20.4), since that one uses the old variable ada-spec-suffix - (let ((old-construct - (assoc "^with[ \t]+\\([a-zA-Z0-9_\\.]+\\)" ff-special-constructs)) - (new-cdr - (lambda () - (if (fboundp 'ff-get-file) - (if (boundp 'fname) - (set 'fname (ff-get-file - ada-search-directories-internal - (ada-make-filename-from-adaname - (match-string 1)) - ada-spec-suffixes))))))) - (if old-construct - (setcdr old-construct new-cdr) - (add-to-list 'ff-special-constructs - (cons "^with[ \t]+\\([a-zA-Z0-9_\\.]+\\)" - new-cdr)))) + (mapc (lambda (pair) + (add-to-list 'ff-special-constructs pair)) + `( + ;; Go to the parent package. + (,(eval-when-compile + (concat "^\\(private[ \t]\\)?[ \t]*package[ \t]+" + "\\(body[ \t]+\\)?" + "\\(\\(\\sw\\|[_.]\\)+\\)\\.\\(\\sw\\|_\\)+[ \t\n]+is")) + . ,(lambda () + (ff-get-file + ada-search-directories-internal + (ada-make-filename-from-adaname (match-string 3)) + ada-spec-suffixes))) + ;; A "separate" clause. + ("^separate[ \t\n]*(\\(\\(\\sw\\|[_.]\\)+\\))" + . ,(lambda () + (ff-get-file + ada-search-directories-internal + (ada-make-filename-from-adaname (match-string 1)) + ada-spec-suffixes))) + ;; A "with" clause. + ("^with[ \t]+\\([a-zA-Z0-9_\\.]+\\)" + . ,(lambda () + (ff-get-file + ada-search-directories-internal + (ada-make-filename-from-adaname (match-string 1)) + ada-spec-suffixes))) + )) ;; Support for outline-minor-mode (set (make-local-variable 'outline-regexp) |