[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#4504: 23.1; [missing feature] `minibuffer-force-completion' does not
From: |
Stefan Monnier |
Subject: |
bug#4504: 23.1; [missing feature] `minibuffer-force-completion' does not cycle through completions |
Date: |
Wed, 23 Sep 2009 22:39:06 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
> The function `minibuffer-force-complete' does not cycle
> through completions; it just steps through the completion list once.
Indeed.
> See attached patch against today CVS version ([2009-09-21 Mon]).
Thank you. I've installed a simpler patch (see below) that makes use of
the `last' function.
> 2009-09-21 <bruno.barbier.cs@orange.fr> or whoever commits it
Actually, this part of the changelog should list the author of the
patch, not the person who committed it.
Stefan
Index: lisp/minibuffer.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/minibuffer.el,v
retrieving revision 1.83
diff -u -r1.83 minibuffer.el
--- lisp/minibuffer.el 2 Sep 2009 03:09:19 -0000 1.83
+++ lisp/minibuffer.el 24 Sep 2009 02:37:30 -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)