# HG changeset patch # User Stefan Monnier # Date 1253759857 0 # Node ID 13f171fbff0567c4c228da2d9c764d2ebf4300de # Parent 500233eb2d72705ae17aaeae7ecf59d004e61a6b (minibuffer-force-complete): Cycle the list, rather than just dropping elements from it (bug#4504). diff -r 500233eb2d72 -r 13f171fbff05 lisp/ChangeLog --- a/lisp/ChangeLog Thu Sep 24 02:15:11 2009 +0000 +++ b/lisp/ChangeLog Thu Sep 24 02:37:37 2009 +0000 @@ -1,5 +1,8 @@ 2009-09-24 Stefan Monnier + * minibuffer.el (minibuffer-force-complete): Cycle the list, rather + than just dropping elements from it (bug#4504). + * term.el (term-set-scroll-region): Don't move cursor any more. (term-handle-ansi-escape): Call term-goto here instead. Suggested by Ivan Kanis . diff -r 500233eb2d72 -r 13f171fbff05 lisp/minibuffer.el --- a/lisp/minibuffer.el Thu Sep 24 02:15:11 2009 +0000 +++ b/lisp/minibuffer.el Thu Sep 24 02:37:37 2009 +0000 @@ -546,7 +546,9 @@ ;; completion-all-sorted-completions to nil, but we prefer not to, ;; so that repeated calls minibuffer-force-complete still cycle ;; through the previous possible completions. - (setq completion-all-sorted-completions (cdr all))))) + (let ((last (last all))) + (setcdr last (cons (car all) (cdr last))) + (setq completion-all-sorted-completions (cdr all)))))) (defvar minibuffer-confirm-exit-commands '(minibuffer-complete minibuffer-complete-word PC-complete PC-complete-word)