diff options
author | Richard M. Stallman <rms@gnu.org> | 1998-01-22 00:44:59 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1998-01-22 00:44:59 +0000 |
commit | 020fdfc82f5a1e9abb3e770dfbc4c0368cadd565 (patch) | |
tree | 2a94c1f977ac50278fc802f47571360cbcf0ee14 /lisp/complete.el | |
parent | 9e09105b2110e12272a90a97d006d09ffc275b1e (diff) | |
download | emacs-020fdfc82f5a1e9abb3e770dfbc4c0368cadd565.tar.gz |
(PC-try-load-many-files): Load files in reverse
order so they come in the right order in the buffer list.
Diffstat (limited to 'lisp/complete.el')
-rw-r--r-- | lisp/complete.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/complete.el b/lisp/complete.el index a20fb7d6516..022e9aebafb 100644 --- a/lisp/complete.el +++ b/lisp/complete.el @@ -781,16 +781,17 @@ or properties are considered." (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 |