comparison lisp/files.el @ 59351:1b286a12854f

(insert-directory): Only look for error lines in inserted text. Don't move too far after processing --dired markers.
author Andreas Schwab <schwab@suse.de>
date Tue, 04 Jan 2005 15:25:43 +0000
parents 28884f0312e2
children 366109711118 cb67264d6096
comparison
equal deleted inserted replaced
59350:4128241e0551 59351:1b286a12854f
4558 (let ((end (line-end-position)) 4558 (let ((end (line-end-position))
4559 (linebeg (point)) 4559 (linebeg (point))
4560 error-lines) 4560 error-lines)
4561 ;; Find all the lines that are error messages, 4561 ;; Find all the lines that are error messages,
4562 ;; and record the bounds of each one. 4562 ;; and record the bounds of each one.
4563 (goto-char (point-min)) 4563 (goto-char beg)
4564 (while (< (point) linebeg) 4564 (while (< (point) linebeg)
4565 (or (eql (following-char) ?\s) 4565 (or (eql (following-char) ?\s)
4566 (push (list (point) (line-end-position)) error-lines)) 4566 (push (list (point) (line-end-position)) error-lines))
4567 (forward-line 1)) 4567 (forward-line 1))
4568 (setq error-lines (nreverse error-lines)) 4568 (setq error-lines (nreverse error-lines))
4584 ;; byte positions of filenames. 4584 ;; byte positions of filenames.
4585 (put-text-property beg (point) 'dired-filename nil) 4585 (put-text-property beg (point) 'dired-filename nil)
4586 (end-of-line)))) 4586 (end-of-line))))
4587 (goto-char end) 4587 (goto-char end)
4588 (beginning-of-line) 4588 (beginning-of-line)
4589 (delete-region (point) (progn (forward-line 2) (point)))) 4589 (delete-region (point) (progn (forward-line 1) (point))))
4590 (forward-line 1)
4591 (if (looking-at "//DIRED-OPTIONS//") 4590 (if (looking-at "//DIRED-OPTIONS//")
4592 (delete-region (point) (progn (forward-line 1) (point))) 4591 (delete-region (point) (progn (forward-line 1) (point))))))
4593 (forward-line 1))))
4594 4592
4595 ;; Now decode what read if necessary. 4593 ;; Now decode what read if necessary.
4596 (let ((coding (or coding-system-for-read 4594 (let ((coding (or coding-system-for-read
4597 file-name-coding-system 4595 file-name-coding-system
4598 default-file-name-coding-system 4596 default-file-name-coding-system