Subject: 25.1; `completion-pcm-all-completions' should not reverse order of candidates

From: Drew Adams <[email-masked]>
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'