Show
Ignore:
Timestamp:
07/29/06 07:48:34 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/progmodes/ada-mode.el

    r4098 r4131  
    12091209  (add-hook 'ff-pre-load-hook 'ada-which-function-are-we-in) 
    12101210 
    1211   ;; Some special constructs for find-file.el 
    1212   ;; We do not need to add the construction for 'with', which is in the 
    1213   ;; standard find-file.el 
     1211  ;; Some special constructs for find-file.el. 
    12141212  (make-local-variable 'ff-special-constructs) 
    1215  
    1216   ;; Go to the parent package : 
    1217   (add-to-list 'ff-special-constructs 
    1218                (cons (eval-when-compile 
    1219                        (concat "^\\(private[ \t]\\)?[ \t]*package[ \t]+" 
    1220                                "\\(body[ \t]+\\)?" 
    1221                                "\\(\\(\\sw\\|[_.]\\)+\\)\\.\\(\\sw\\|_\\)+[ \t\n]+is")) 
    1222                      (lambda () 
    1223                        (if (fboundp 'ff-get-file) 
    1224                            (if (boundp 'fname) 
    1225                                (set 'fname (ff-get-file 
    1226                                             ada-search-directories-internal 
    1227                                             (ada-make-filename-from-adaname 
    1228                                              (match-string 3)) 
    1229                                             ada-spec-suffixes))))))) 
    1230   ;; Another special construct for find-file.el : when in a separate clause, 
    1231   ;; go to the correct package. 
    1232   (add-to-list 'ff-special-constructs 
    1233                (cons "^separate[ \t\n]*(\\(\\(\\sw\\|[_.]\\)+\\))" 
    1234                      (lambda () 
    1235                        (if (fboundp 'ff-get-file) 
    1236                            (if (boundp 'fname) 
    1237                                (setq fname (ff-get-file 
    1238                                             ada-search-directories-internal 
    1239                                             (ada-make-filename-from-adaname 
    1240                                              (match-string 1)) 
    1241                                             ada-spec-suffixes))))))) 
    1242  
    1243   ;; Another special construct, that redefines the one in find-file.el. The 
    1244   ;; old one can handle only one possible type of extension for Ada files 
    1245   ;;  remove from the list the standard "with..." that is put by find-file.el, 
    1246   ;;  since it uses the old ada-spec-suffix variable 
    1247   ;; This one needs to replace the standard one defined in find-file.el (with 
    1248   ;;  Emacs <= 20.4), since that one uses the old variable ada-spec-suffix 
    1249   (let ((old-construct 
    1250          (assoc "^with[ \t]+\\([a-zA-Z0-9_\\.]+\\)" ff-special-constructs)) 
    1251         (new-cdr 
    1252          (lambda () 
    1253            (if (fboundp 'ff-get-file) 
    1254                (if (boundp 'fname) 
    1255                    (set 'fname (ff-get-file 
    1256                                 ada-search-directories-internal 
    1257                                 (ada-make-filename-from-adaname 
    1258                                  (match-string 1)) 
    1259                                 ada-spec-suffixes))))))) 
    1260     (if old-construct 
    1261         (setcdr old-construct new-cdr) 
    1262       (add-to-list 'ff-special-constructs 
    1263                    (cons "^with[ \t]+\\([a-zA-Z0-9_\\.]+\\)" 
    1264                          new-cdr)))) 
     1213  (mapc (lambda (pair) 
     1214          (add-to-list 'ff-special-constructs pair)) 
     1215        `( 
     1216          ;; Go to the parent package. 
     1217          (,(eval-when-compile 
     1218              (concat "^\\(private[ \t]\\)?[ \t]*package[ \t]+" 
     1219                      "\\(body[ \t]+\\)?" 
     1220                      "\\(\\(\\sw\\|[_.]\\)+\\)\\.\\(\\sw\\|_\\)+[ \t\n]+is")) 
     1221           . ,(lambda () 
     1222                (ff-get-file 
     1223                 ada-search-directories-internal 
     1224                 (ada-make-filename-from-adaname (match-string 3)) 
     1225                 ada-spec-suffixes))) 
     1226          ;; A "separate" clause. 
     1227          ("^separate[ \t\n]*(\\(\\(\\sw\\|[_.]\\)+\\))" 
     1228           . ,(lambda () 
     1229                (ff-get-file 
     1230                 ada-search-directories-internal 
     1231                 (ada-make-filename-from-adaname (match-string 1)) 
     1232                 ada-spec-suffixes))) 
     1233          ;; A "with" clause. 
     1234          ("^with[ \t]+\\([a-zA-Z0-9_\\.]+\\)" 
     1235           . ,(lambda () 
     1236                (ff-get-file 
     1237                 ada-search-directories-internal 
     1238                 (ada-make-filename-from-adaname (match-string 1)) 
     1239                 ada-spec-suffixes))) 
     1240          )) 
    12651241 
    12661242  ;;  Support for outline-minor-mode