From: Stefan Monnier Date: Thu, 24 Sep 2009 02:37:37 +0000 (+0000) Subject: (minibuffer-force-complete): Cycle the list, rather X-Git-Tag: emacs-pretest-23.1.90~1170 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=075518b529153bbd7d169d4aa9b6b127ec2d8682;p=emacs.git (minibuffer-force-complete): Cycle the list, rather than just dropping elements from it (bug#4504). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e216b9e1c7f..d41c8f2d0ac 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 90490973f80..8f2de068444 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -546,7 +546,9 @@ Repeated uses step through the possible completions." ;; 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)