Mercurial > hg > xemacs-beta
comparison lisp/files.el @ 4400:555e21a66d51
2008-01-13 Michael Sperber <mike@xemacs.org>
* files.el (insert-directory): Bind `coding-system-for-read'
according to the current locale where available. (Previously, the
default ended up being undecided, which doesn't work well for
UTF-8-based locales, for example.)
author | Mike Sperber <sperber@deinprogramm.de> |
---|---|
date | Thu, 17 Jan 2008 10:18:05 +0100 |
parents | c5a2b80bc4fa |
children | 8cef85a39d2c |
comparison
equal
deleted
inserted
replaced
4399:e5b3c4dbc8a2 | 4400:555e21a66d51 |
---|---|
4175 (eq system-type 'windows-nt)) | 4175 (eq system-type 'windows-nt)) |
4176 (declare-fboundp (mswindows-insert-directory | 4176 (declare-fboundp (mswindows-insert-directory |
4177 file switches wildcard full-directory-p))) | 4177 file switches wildcard full-directory-p))) |
4178 (t | 4178 (t |
4179 (let* ((beg (point)) | 4179 (let* ((beg (point)) |
4180 ;; on Unix, assume that ls will output in what the | |
4181 ;; file-name coding system specifies | |
4182 (coding-system-for-read (get-coding-system 'file-name)) | |
4180 (result | 4183 (result |
4181 (if wildcard | 4184 (if wildcard |
4182 ;; Run ls in the directory of the file pattern we asked for. | 4185 ;; Run ls in the directory of the file pattern we asked for. |
4183 (let ((default-directory | 4186 (let ((default-directory |
4184 (if (file-name-absolute-p file) | 4187 (if (file-name-absolute-p file) |