# HG changeset patch # User Richard M. Stallman # Date 885429899 0 # Node ID 780929dca508b5de0a80c428d2e6934be578b852 # Parent ed9ed828415e1a770504fb183fc4dc826b12e2bb (PC-try-load-many-files): Load files in reverse order so they come in the right order in the buffer list. diff -r ed9ed828415e -r 780929dca508 lisp/complete.el --- a/lisp/complete.el Wed Jan 21 23:32:12 1998 +0000 +++ b/lisp/complete.el Thu Jan 22 00:44:59 1998 +0000 @@ -781,16 +781,17 @@ (let* ((pat buffer-file-name) (files (PC-expand-many-files pat)) (first (car files)) - (next files)) + (next (reverse (cdr files)))) (kill-buffer (current-buffer)) (or files (error "No matching files")) ;; Bring the other files (not the first) into buffers. (save-window-excursion - (while (setq next (cdr next)) + (while next (let ((buf (find-file-noselect (car next)))) ;; Put this buffer at the front of the buffer list. - (switch-to-buffer buf)))) + (switch-to-buffer buf)) + (setq next (cdr next)))) ;; This modifies the `buf' variable inside find-file-noselect. (setq buf (get-file-buffer first)) (if buf