Ted Zlatanov writes: > On Thu, 30 Sep 2010 18:33:44 +0200 Lars Magne Ingebrigtsen wrote: > > LMI> If there are more than ten lines of code, then it can't be counted as a > LMI> (tiny change), and we need to revert it. If it is, could you create a > LMI> patch to revert those lines? > > The biggest chunk of the patch are these three functions. The two > wrappers are trivially rewritten. `gnus-icompleting-read' can be > rewritten pretty easily; I think the main portion (the lambda) can be > rewritten as: > > ... > (let ((iswitchb-make-buflist-hook > (lambda () > (setq iswitchb-temp-buflist > (let ((choices (append > (when initial-input (list initial-input)) > history collection)) > filtered-choices) > (dolist (x choices) > (setq filtered-choices (adjoin x filtered-choices))) > (nreverse filtered-choices)))))) > ... > > Which is inspired by the original patch but not a copy (Florian, can you > check for correctness?). If that's reasonable I can rewrite more, as > much as needed to make the remainder trivial. This appears to be as correct as my initial version of it. However, Julien made some follow-up changes to it, fixing a bug regarding handling of history. Your version makes the same mistake I initially did. Julien's fix needs to be adapted for the new code. > This did make me wish for a "collect unique x" option for the CL loop > :) That'd be nice, but with cl, there's also `remove-duplicates'. Without cl, the following is probably much more elegant than the original patch: (delq nil (delete-dups ...))