]> code.delx.au - gnu-emacs/commitdiff
(file-name-non-special): For insert-directory operation,
authorKarl Heuer <kwzh@gnu.org>
Sun, 19 Oct 1997 21:02:27 +0000 (21:02 +0000)
committerKarl Heuer <kwzh@gnu.org>
Sun, 19 Oct 1997 21:02:27 +0000 (21:02 +0000)
ensure that default-directory is an ordinary file name
before turning off file-name-handler-alist.

lisp/files.el

index 01712f58e7b7fc3cd5435a9f22d3acb38ba06c54..6054af1b4e8da5682bed2acc1d122db771bc0c6a 100644 (file)
@@ -3076,6 +3076,12 @@ With prefix arg, silently save all file-visiting buffers, then kill."
 
 (defun file-name-non-special (operation &rest arguments)
   (let ((file-name-handler-alist nil)
+       (default-directory
+         (if (eq operation 'insert-directory)
+             (directory-file-name
+              (expand-file-name 
+               (unhandled-file-name-directory default-directory)))
+           default-directory))
        ;; Get a list of the indices of the args which are file names.
        (file-arg-indices
         (cdr (or (assq operation