;;; find-file.el --- find a file corresponding to this one given a pattern
-;; Author: Henry Guillaume <henry@qbd.com.au>
+;; Author: Henry Guillaume <henri@tibco.com, henry@c032.aone.net.au>
;; Keywords: c, matching, tools
;; Copyright (C) 1994, 1995 Free Software Foundation, Inc.
specified in `ff-search-directories'. If a file is not found, a new one
is created with the first matching extension (`.cc' yields `.hh').")
-(defvar ada-search-directories
- '("." "/usr/adainclude" "/usr/local/adainclude")
- "*See the description for the `ff-search-directories' variable.")
-
-(defvar ada-other-file-alist
- '(
- ("\\.ads$" (".adb")) ;; Ada specs and bodies
- ("\\.adb$" (".ads")) ;; GNAT filename conventions
- )
- "*Alist of extensions to find given the current file's extension.
-
-This list should contain the most used extensions before the others,
-since the search algorithm searches sequentially through each directory
-specified in `ada-search-directories'. If a file is not found, a new one
-is created with the first matching extension (`.adb' yields `.ads').
-")
-
(defvar modula2-other-file-alist
'(
("\\.mi$" (".md")) ;; Modula-2 module definition
(ff-find-file pathname in-other-window t)))
(t ;; don't create the file, just whinge
- (message "no file found for %s" fname))))
+ (message "No file found for %s" fname))))
(t ;; matching file found
nil))))
(setq filename (concat fname-stub this-suffix))
(if (not ff-quiet-mode)
- (message "finding buffer %s..." filename))
+ (message "Finding buffer %s..." filename))
- (if (bufferp (get-buffer filename))
- (setq found (buffer-file-name (get-buffer filename))))
+ (if (bufferp (get-file-buffer filename))
+ (setq found (buffer-file-name (get-file-buffer filename))))
(setq blist (buffer-list))
(setq buf (buffer-name (car blist)))
(setq file (concat dir "/" filename))
(if (not ff-quiet-mode)
- (message "finding %s..." file))
+ (message "Finding %s..." file))
(if (file-exists-p file)
(setq found file))
(defvar ff-function-name nil "Name of the function we are in.")
-(defvar ada-procedure-start-regexp)
-(defvar ada-package-start-regexp)
+(eval-when-compile (require 'ada-mode))
;; bind with (setq ff-pre-load-hooks 'ff-which-function-are-we-in)
;;