[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/files.el [emacs-unicode-2]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/files.el [emacs-unicode-2] |
Date: |
Tue, 29 Jun 2004 13:25:43 -0400 |
Index: emacs/lisp/files.el
diff -c emacs/lisp/files.el:1.666.2.3 emacs/lisp/files.el:1.666.2.4
*** emacs/lisp/files.el:1.666.2.3 Mon Jun 28 07:28:39 2004
--- emacs/lisp/files.el Tue Jun 29 16:44:54 2004
***************
*** 393,399 ****
(defvar write-contents-functions nil
"List of functions to be called before writing out a buffer to a file.
If one of them returns non-nil, the file is considered already written
! and the rest are not called.
This variable is meant to be used for hooks that pertain to the
buffer's contents, not to the particular visited file; thus,
--- 393,400 ----
(defvar write-contents-functions nil
"List of functions to be called before writing out a buffer to a file.
If one of them returns non-nil, the file is considered already written
! and the rest are not called and neither are the functions in
! `write-file-functions'.
This variable is meant to be used for hooks that pertain to the
buffer's contents, not to the particular visited file; thus,
***************
*** 649,655 ****
(load library))
(defun file-remote-p (file)
! "Test whether FILE specifies a location on a remote system."
(let ((handler (find-file-name-handler file 'file-remote-p)))
(if handler
(funcall handler 'file-remote-p file)
--- 650,662 ----
(load library))
(defun file-remote-p (file)
! "Test whether FILE specifies a location on a remote system.
! Return an identification of the system if the location is indeed
! remote. The identification of the system may comprise a method
! to access the system and its hostname, amongst other things.
!
! For example, the filename \"/address@hidden:/foo\" specifies a location
! on the system \"/address@hidden:\"."
(let ((handler (find-file-name-handler file 'file-remote-p)))
(if handler
(funcall handler 'file-remote-p file)
***************
*** 2915,2922 ****
(file-name-as-directory (expand-file-name (or directory
default-directory))))
(setq filename (expand-file-name filename))
! (let ((hf (find-file-name-handler filename 'file-remote-p))
! (hd (find-file-name-handler directory 'file-remote-p)))
(if ;; Conditions for separate trees
(or
;; Test for different drives on DOS/Windows
--- 2922,2929 ----
(file-name-as-directory (expand-file-name (or directory
default-directory))))
(setq filename (expand-file-name filename))
! (let ((fremote (file-remote-p filename))
! (dremote (file-remote-p directory)))
(if ;; Conditions for separate trees
(or
;; Test for different drives on DOS/Windows
***************
*** 2924,2943 ****
;; Should `cygwin' really be included here? --stef
(memq system-type '(ms-dos cygwin windows-nt))
(not (eq t (compare-strings filename 0 2 directory 0 2))))
- ;; Test for different remote file handlers
- (not (eq hf hd))
;; Test for different remote file system identification
! (and
! hf
! (let ((re (car (rassq hf file-name-handler-alist))))
! (not
! (equal
! (and
! (string-match re filename)
! (substring filename 0 (match-end 0)))
! (and
! (string-match re directory)
! (substring directory 0 (match-end 0))))))))
filename
(let ((ancestor ".")
(filename-dir (file-name-as-directory filename)))
--- 2931,2938 ----
;; Should `cygwin' really be included here? --stef
(memq system-type '(ms-dos cygwin windows-nt))
(not (eq t (compare-strings filename 0 2 directory 0 2))))
;; Test for different remote file system identification
! (not (equal fremote dremote)))
filename
(let ((ancestor ".")
(filename-dir (file-name-as-directory filename)))