# HG changeset patch # User Richard M. Stallman # Date 895807468 0 # Node ID edc72bb3a3ffc36a7806337acdee58809bd359bb # Parent 09a101ff18850a2e89607894cedbcbbb16e9f116 (insert-directory): When WILDCARD is nil, expand ~ if necessary. diff -r 09a101ff1885 -r edc72bb3a3ff lisp/files.el --- a/lisp/files.el Thu May 21 23:55:08 1998 +0000 +++ b/lisp/files.el Fri May 22 03:24:28 1998 +0000 @@ -3031,7 +3031,7 @@ (and enable-multibyte-characters (or file-name-coding-system default-file-name-coding-system))) - ;; This binding is for encoding arguements by call-process. + ;; This is to control encoding the arguments in call-process. (coding-system-for-write coding-system-for-read) (result (if wildcard @@ -3081,10 +3081,13 @@ (append list ;; Avoid lossage if FILE starts with `-'. '("--") - (list - (if full-directory-p - (concat (file-name-as-directory file) ".") - file)))))))) + (progn + (if (string-match "\\`~" file) + (setq file (expand-file-name file))) + (list + (if full-directory-p + (concat (file-name-as-directory file) ".") + file))))))))) (if (/= result 0) ;; We get here if ls failed. ;; Access the file to get a suitable error.