emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/files.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/files.el
Date: Mon, 09 Sep 2002 15:23:37 -0400

Index: emacs/lisp/files.el
diff -c emacs/lisp/files.el:1.607 emacs/lisp/files.el:1.608
*** emacs/lisp/files.el:1.607   Sat Sep  7 17:30:37 2002
--- emacs/lisp/files.el Mon Sep  9 15:23:37 2002
***************
*** 2574,2591 ****
  (defun make-backup-file-name-1 (file)
    "Subroutine of `make-backup-file-name' and `find-backup-file-name'."
    (let ((alist backup-directory-alist)
!       elt backup-directory)
      (while alist
        (setq elt (pop alist))
        (if (string-match (car elt) file)
          (setq backup-directory (cdr elt)
                alist nil)))
!     (if (null backup-directory)
!       file
!       (unless (file-exists-p backup-directory)
        (condition-case nil
            (make-directory backup-directory 'parents)
!         (file-error file)))
        (if (file-name-absolute-p backup-directory)
          (progn
            (when (memq system-type '(windows-nt ms-dos))
--- 2574,2591 ----
  (defun make-backup-file-name-1 (file)
    "Subroutine of `make-backup-file-name' and `find-backup-file-name'."
    (let ((alist backup-directory-alist)
!       elt backup-directory failed)
      (while alist
        (setq elt (pop alist))
        (if (string-match (car elt) file)
          (setq backup-directory (cdr elt)
                alist nil)))
!     (if (and backup-directory (not (file-exists-p backup-directory)))
        (condition-case nil
            (make-directory backup-directory 'parents)
!         (file-error (setq backup-directory nil))))
!     (if (null backup-directory)
!       file
        (if (file-name-absolute-p backup-directory)
          (progn
            (when (memq system-type '(windows-nt ms-dos))
***************
*** 3199,3204 ****
--- 3199,3207 ----
     (list (read-file-name "Make directory: " default-directory 
default-directory
                         nil nil)
         t))
+   ;; If default-directory is a remote directory,
+   ;; make sure we find its make-directory handler.
+   (setq dir (expand-file-name dir))
    (let ((handler (find-file-name-handler dir 'make-directory)))
      (if handler
        (funcall handler 'make-directory dir parents)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]