aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-01-12 21:03:32 +0000
committerRichard M. Stallman1995-01-12 21:03:32 +0000
commitdae0ae5d73e9d23017cfb69d6d4688816322e2e2 (patch)
tree9828750c6e1ebeb2f626b8204329ccc0d0a8082a
parent0c97bd6a43547764cf38583a88203cc8a5f2d545 (diff)
downloademacs-dae0ae5d73e9d23017cfb69d6d4688816322e2e2.tar.gz
emacs-dae0ae5d73e9d23017cfb69d6d4688816322e2e2.zip
(ange-ftp-set-buffer-mode): Don't set make-backup-files.
(ange-ftp-real-find-backup-file-name): New function. (ange-ftp-find-backup-file-name): New function. Use it to handle find-backup-file-name.
-rw-r--r--lisp/ange-ftp.el17
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/ange-ftp.el b/lisp/ange-ftp.el
index b756c055736..cf09115826e 100644
--- a/lisp/ange-ftp.el
+++ b/lisp/ange-ftp.el
@@ -63,8 +63,7 @@
63;;; specially. The variable `ange-ftp-generate-anonymous-password' 63;;; specially. The variable `ange-ftp-generate-anonymous-password'
64;;; controls what happens: if the value of this variable is a string, 64;;; controls what happens: if the value of this variable is a string,
65;;; then this is used as the password; if non-nil (the default), then 65;;; then this is used as the password; if non-nil (the default), then
66;;; a password is created from the name of the user and the hostname 66;;; the value of `user-mail-address' is used; if nil then the user
67;;; of the machine on which GNU Emacs is running; if nil then the user
68;;; is prompted for a password as normal. 67;;; is prompted for a password as normal.
69 68
70;;; "Dumb" UNIX hosts: 69;;; "Dumb" UNIX hosts:
@@ -1324,10 +1323,7 @@ Optional DEFAULT is password to start with."
1324 "Set correct modes for the current buffer if visiting a remote file." 1323 "Set correct modes for the current buffer if visiting a remote file."
1325 (if (and (stringp buffer-file-name) 1324 (if (and (stringp buffer-file-name)
1326 (ange-ftp-ftp-name buffer-file-name)) 1325 (ange-ftp-ftp-name buffer-file-name))
1327 (progn 1326 (auto-save-mode ange-ftp-auto-save)))
1328 (make-local-variable 'make-backup-files)
1329 (setq make-backup-files ange-ftp-make-backup-files)
1330 (auto-save-mode ange-ftp-auto-save))))
1331 1327
1332(defun ange-ftp-kill-ftp-process (buffer) 1328(defun ange-ftp-kill-ftp-process (buffer)
1333 "Kill the FTP process associated with BUFFER. 1329 "Kill the FTP process associated with BUFFER.
@@ -3802,6 +3798,12 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
3802 (ange-ftp-copy-file-internal tmp2 nfile t nil msg2)))) 3798 (ange-ftp-copy-file-internal tmp2 nfile t nil msg2))))
3803 (ange-ftp-del-tmp-name tmp1) 3799 (ange-ftp-del-tmp-name tmp1)
3804 (ange-ftp-del-tmp-name tmp2)))) 3800 (ange-ftp-del-tmp-name tmp2))))
3801
3802(defun ange-ftp-find-backup-file-name (fn)
3803 ;; Either return the ordinary backup name, etc.,
3804 ;; or return nil meaning don't make a backup.
3805 (if ange-ftp-make-backup-files
3806 (ange-ftp-real-find-backup-file-name fn)))
3805 3807
3806;;; Define the handler for special file names 3808;;; Define the handler for special file names
3807;;; that causes ange-ftp to be invoked. 3809;;; that causes ange-ftp to be invoked.
@@ -3873,6 +3875,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
3873(put 'dired-uncache 'ange-ftp 'ange-ftp-dired-uncache) 3875(put 'dired-uncache 'ange-ftp 'ange-ftp-dired-uncache)
3874(put 'dired-compress-file 'ange-ftp 'ange-ftp-dired-compress-file) 3876(put 'dired-compress-file 'ange-ftp 'ange-ftp-dired-compress-file)
3875(put 'load 'ange-ftp 'ange-ftp-load) 3877(put 'load 'ange-ftp 'ange-ftp-load)
3878(put 'find-backup-file-name 'ange-ftp 'ange-ftp-find-backup-file-name)
3876 3879
3877;; Turn off truename processing to save time. 3880;; Turn off truename processing to save time.
3878;; Treat each name as its own truename. 3881;; Treat each name as its own truename.
@@ -3952,6 +3955,8 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
3952 (ange-ftp-run-real-handler 'shell-command args)) 3955 (ange-ftp-run-real-handler 'shell-command args))
3953(defun ange-ftp-real-load (&rest args) 3956(defun ange-ftp-real-load (&rest args)
3954 (ange-ftp-run-real-handler 'load args)) 3957 (ange-ftp-run-real-handler 'load args))
3958(defun ange-ftp-real-find-backup-file-name (&rest args)
3959 (ange-ftp-run-real-handler 'find-backup-file-name args))
3955 3960
3956;; Here we support using dired on remote hosts. 3961;; Here we support using dired on remote hosts.
3957;; I have turned off the support for using dired on foreign directory formats. 3962;; I have turned off the support for using dired on foreign directory formats.