bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24676: 25.1; `completion-pcm-all-completions' should not reverse ord


From: Drew Adams
Subject: bug#24676: 25.1; `completion-pcm-all-completions' should not reverse order of candidates
Date: Wed, 12 Oct 2016 09:56:32 -0700 (PDT)

Because of this part, at the end of the function,
`completion-pcm-all-completions' reverses the order of the candidates.

(let ((poss ()))
  (dolist (c compl)
    (when (string-match-p regex c) (push c poss))) ; <==== reverses
  poss)

It should not do this.  Users should be able to depend on whatever order
the candidates are already in (as returned by `all-completions').

For example, for buffer candidates, the default order from
`all-completions' is last-display-time order.

The fix is trivial:

(let ((poss ()))
  (dolist (c compl)
    (when (string-match-p regex c) (push c poss)))
  (nreverse poss))


In GNU Emacs 25.1.1 (x86_64-w64-mingw32)
 of 2016-09-17
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --without-dbus --without-compress-install CFLAGS=-static'





reply via email to

[Prev in Thread] Current Thread [Next in Thread]