aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2003-02-17 06:18:58 +0000
committerKenichi Handa2003-02-17 06:18:58 +0000
commit7702ccc5293ac5fe21ee9de8aeb4b4688b62690b (patch)
tree4f24a7a25855e13c82da4564aa93a8ea8796cdc7
parentfb4452cc3205120d4f8d515083474d9bd05daa43 (diff)
downloademacs-7702ccc5293ac5fe21ee9de8aeb4b4688b62690b.tar.gz
emacs-7702ccc5293ac5fe21ee9de8aeb4b4688b62690b.zip
(insert-directory): Add workaround for the case that we
can't trust ls's output as to byte positions of filenames.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/files.el7
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7c580834757..cda55cbaf47 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12003-02-17 Kenichi Handa <handa@m17n.org>
2
3 * files.el (insert-directory): Add workaround for the case that we
4 can't trust ls's output as to byte positions of filenames.
5
12003-02-15 Richard M. Stallman <rms@gnu.org> 62003-02-15 Richard M. Stallman <rms@gnu.org>
2 7
3 * ffap.el: Many doc fixes. 8 * ffap.el: Many doc fixes.
diff --git a/lisp/files.el b/lisp/files.el
index 1d0816ee572..a965cd6c08c 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4110,7 +4110,12 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
4110 (while (< (point) end) 4110 (while (< (point) end)
4111 (let ((start (+ beg (read (current-buffer)))) 4111 (let ((start (+ beg (read (current-buffer))))
4112 (end (+ beg (read (current-buffer))))) 4112 (end (+ beg (read (current-buffer)))))
4113 (put-text-property start end 'dired-filename t))) 4113 (if (= (char-after end) ?\n)
4114 (put-text-property start end 'dired-filename t)
4115 ;; It seems that we can't trust ls's output as to
4116 ;; byte positions of filenames.
4117 (put-text-property beg (point) 'dired-filename nil)
4118 (end-of-line))))
4114 (goto-char end) 4119 (goto-char end)
4115 (beginning-of-line) 4120 (beginning-of-line)
4116 (delete-region (point) (progn (forward-line 2) (point))))) 4121 (delete-region (point) (progn (forward-line 2) (point)))))