changeset 22179:edc72bb3a3ff

(insert-directory): When WILDCARD is nil, expand ~ if necessary.
author Richard M. Stallman <rms@gnu.org>
date Fri, 22 May 1998 03:24:28 +0000
parents 09a101ff1885
children 485917486caf
files lisp/files.el
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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.