jbw@bucsb.UUCP (Joe Wells) (11/30/88)
In lisp/dired.el, the function dired-do-deletions has a very annoying feature. To display the files to be deleted, it uses switch-to-buffer, which will usually completely erase the screen. This is very time-consuming, even on a 9600 bps terminal. So I fixed it so that it uses with-output-to-temp-buffer instead. My patch is included. -- Joe Wells INTERNET: jbw%bucsf.bu.edu@bu-it.bu.edu UUCP: ...!harvard!bu-cs!bucsf!jbw *** dired.el Tue Nov 29 23:50:46 1988 --- dired-new.el Tue Nov 29 23:52:01 1988 *************** *** 547,574 **** (interactive) (let (delete-list answer) (save-excursion ! (goto-char 1) ! (while (re-search-forward "^D" nil t) ! (setq delete-list ! (cons (cons (dired-get-filename t) (1- (point))) ! delete-list)))) (if (null delete-list) (message "(No deletions requested)") (save-window-excursion ! (switch-to-buffer " *Deletions*") ! (erase-buffer) ! (setq fill-column 70) ! (let ((l (reverse delete-list))) ! ;; Files should be in forward order for this loop. ! (while l ! (if (> (current-column) 59) ! (insert ?\n) ! (or (bobp) ! (indent-to (* (/ (+ (current-column) 19) 20) 20) 1))) ! (insert (car (car l))) ! (setq l (cdr l)))) ! (goto-char (point-min)) ! (setq answer (yes-or-no-p "Delete these files? "))) (if answer (let ((l delete-list) failures) --- 547,575 ---- (interactive) (let (delete-list answer) (save-excursion ! (goto-char 1) ! (while (re-search-forward "^D" nil t) ! (setq delete-list ! (cons (cons (dired-get-filename t) (1- (point))) ! delete-list)))) (if (null delete-list) (message "(No deletions requested)") (save-window-excursion ! (with-output-to-temp-buffer " *Deletions*" ! (save-excursion ! (set-buffer standard-output) ! (setq fill-column 70) ! (let ((l (reverse delete-list))) ! ;; Files should be in forward order for this loop. ! (while l ! (if (> (current-column) 59) ! (insert ?\n) ! (or (bobp) ! (indent-to (* (/ (+ (current-column) 19) 20) 20) 1))) ! (insert (car (car l))) ! (setq l (cdr l)))) ! (goto-char (point-min)))) ! (setq answer (yes-or-no-p "Delete these files? "))) (if answer (let ((l delete-list) failures)