aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-05-22 03:24:28 +0000
committerRichard M. Stallman1998-05-22 03:24:28 +0000
commit6a97049b56c73351d169fa1a6a9a39b57a8886ad (patch)
tree520d8af9ffcf77ac6c690a844e1f63c1d96ab4a9
parent6c01544a0723026700ef45e85357a603d450f7f4 (diff)
downloademacs-6a97049b56c73351d169fa1a6a9a39b57a8886ad.tar.gz
emacs-6a97049b56c73351d169fa1a6a9a39b57a8886ad.zip
(insert-directory): When WILDCARD is nil, expand ~ if necessary.
-rw-r--r--lisp/files.el13
1 files changed, 8 insertions, 5 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 7d1ffa81235..51a29e47408 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3031,7 +3031,7 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
3031 (and enable-multibyte-characters 3031 (and enable-multibyte-characters
3032 (or file-name-coding-system 3032 (or file-name-coding-system
3033 default-file-name-coding-system))) 3033 default-file-name-coding-system)))
3034 ;; This binding is for encoding arguements by call-process. 3034 ;; This is to control encoding the arguments in call-process.
3035 (coding-system-for-write coding-system-for-read) 3035 (coding-system-for-write coding-system-for-read)
3036 (result 3036 (result
3037 (if wildcard 3037 (if wildcard
@@ -3081,10 +3081,13 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
3081 (append list 3081 (append list
3082 ;; Avoid lossage if FILE starts with `-'. 3082 ;; Avoid lossage if FILE starts with `-'.
3083 '("--") 3083 '("--")
3084 (list 3084 (progn
3085 (if full-directory-p 3085 (if (string-match "\\`~" file)
3086 (concat (file-name-as-directory file) ".") 3086 (setq file (expand-file-name file)))
3087 file)))))))) 3087 (list
3088 (if full-directory-p
3089 (concat (file-name-as-directory file) ".")
3090 file)))))))))
3088 (if (/= result 0) 3091 (if (/= result 0)
3089 ;; We get here if ls failed. 3092 ;; We get here if ls failed.
3090 ;; Access the file to get a suitable error. 3093 ;; Access the file to get a suitable error.