Mercurial > emacs
comparison lisp/files.el @ 49817:6455c268ddb1
(insert-directory): Add workaround for the case that we
can't trust ls's output as to byte positions of filenames.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 17 Feb 2003 06:18:32 +0000 |
parents | 54768b86165d |
children | f2039eaf90bb |
comparison
equal
deleted
inserted
replaced
49816:bc226af8acd5 | 49817:6455c268ddb1 |
---|---|
4108 (forward-word 1) | 4108 (forward-word 1) |
4109 (forward-char 3) | 4109 (forward-char 3) |
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))))) |
4117 | 4122 |
4118 ;; Now decode what read if necessary. | 4123 ;; Now decode what read if necessary. |