[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/find-file.el
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/find-file.el |
Date: |
Tue, 04 Feb 2003 06:19:31 -0500 |
Index: emacs/lisp/find-file.el
diff -c emacs/lisp/find-file.el:1.21 emacs/lisp/find-file.el:1.22
*** emacs/lisp/find-file.el:1.21 Sat Oct 26 18:35:16 2002
--- emacs/lisp/find-file.el Tue Feb 4 06:19:31 2003
***************
*** 70,78 ****
;; ("\\.hh$" ff-cc-hh-converter)
;; ("\\.c$" (".h"))
;; ("\\.h$" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp"))))
! ;;
;; ff-cc-hh-converter is included at the end of this file as a reference.
! ;;
;; SEARCHING is carried out in a set of directories specified by the
;; ff-search-directories variable:
;;
--- 70,78 ----
;; ("\\.hh$" ff-cc-hh-converter)
;; ("\\.c$" (".h"))
;; ("\\.h$" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp"))))
! ;;
;; ff-cc-hh-converter is included at the end of this file as a reference.
! ;;
;; SEARCHING is carried out in a set of directories specified by the
;; ff-search-directories variable:
;;
***************
*** 500,511 ****
(read-file-name
(format "Find or create %s in: " default-name)
default-directory default-name nil)))
!
(setq pathname
(if (file-directory-p name)
(concat (file-name-as-directory name) default-name)
(setq found name)))
!
(ff-find-file pathname in-other-window t)))
(t ;; don't create the file, just whinge
--- 500,511 ----
(read-file-name
(format "Find or create %s in: " default-name)
default-directory default-name nil)))
!
(setq pathname
(if (file-directory-p name)
(concat (file-name-as-directory name) default-name)
(setq found name)))
!
(ff-find-file pathname in-other-window t)))
(t ;; don't create the file, just whinge
***************
*** 619,625 ****
for fname with each of the given suffixes. Get the file or the buffer
corresponding to the name of the first file found, or nil."
(let ((filename (ff-get-file-name search-dirs filename suffix-list)))
!
(cond
((not filename)
nil)
--- 619,625 ----
for fname with each of the given suffixes. Get the file or the buffer
corresponding to the name of the first file found, or nil."
(let ((filename (ff-get-file-name search-dirs filename suffix-list)))
!
(cond
((not filename)
nil)
***************
*** 627,633 ****
((bufferp (get-file-buffer filename))
(ff-switch-to-buffer (get-file-buffer filename) other-window)
filename)
!
((file-exists-p filename)
(ff-find-file filename other-window nil)
filename)
--- 627,633 ----
((bufferp (get-file-buffer filename))
(ff-switch-to-buffer (get-file-buffer filename) other-window)
filename)
!
((file-exists-p filename)
(ff-find-file filename other-window nil)
filename)
***************
*** 659,665 ****
(setq this-suffix (car suffixes))
(setq this-suffix "")
(setq suffixes (list "")))
!
;; find whether the file is in a buffer first
(while (and suffixes (not found))
(setq filename (concat fname-stub this-suffix))
--- 659,665 ----
(setq this-suffix (car suffixes))
(setq this-suffix "")
(setq suffixes (list "")))
!
;; find whether the file is in a buffer first
(while (and suffixes (not found))
(setq filename (concat fname-stub this-suffix))
***************
*** 693,717 ****
;; if dir does not contain '/*', look for the file
(if (and dir (not (string-match "\\([^*]*\\)/\\\*\\(/.*\\)*" dir)))
(progn
!
;; suffixes is nil => fname-stub is the file we are looking for
;; otherwise fname-stub is a stub, and we append a suffix
(if suffixes
(setq this-suffix (car suffixes))
(setq this-suffix "")
(setq suffixes (list "")))
!
(while (and suffixes (not found))
(setq filename (concat fname-stub this-suffix))
(setq file (concat dir "/" filename))
!
(if (not ff-quiet-mode)
(message "Finding %s..." file))
(if (file-exists-p file)
(setq found file))
!
(setq suffixes (cdr suffixes))
(setq this-suffix (car suffixes))))
--- 693,717 ----
;; if dir does not contain '/*', look for the file
(if (and dir (not (string-match "\\([^*]*\\)/\\\*\\(/.*\\)*" dir)))
(progn
!
;; suffixes is nil => fname-stub is the file we are looking for
;; otherwise fname-stub is a stub, and we append a suffix
(if suffixes
(setq this-suffix (car suffixes))
(setq this-suffix "")
(setq suffixes (list "")))
!
(while (and suffixes (not found))
(setq filename (concat fname-stub this-suffix))
(setq file (concat dir "/" filename))
!
(if (not ff-quiet-mode)
(message "Finding %s..." file))
(if (file-exists-p file)
(setq found file))
!
(setq suffixes (cdr suffixes))
(setq this-suffix (car suffixes))))
***************
*** 935,941 ****
))
(t
nil))
!
return-list))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
--- 935,941 ----
))
(t
nil))
!
return-list))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/find-file.el,
Juanma Barranquero <=