]> git.eshelyaron.com Git - emacs.git/commitdiff
Preserve order of completion during cycling
authorPhilip Kaludercic <philipk@posteo.net>
Mon, 14 Jun 2021 07:31:01 +0000 (09:31 +0200)
committerPhilip Kaludercic <philipk@posteo.net>
Mon, 14 Jun 2021 09:52:28 +0000 (11:52 +0200)
* rcirc.el (rcirc-completion-at-point): Specify cycle-sort-function

lisp/net/rcirc.el

index 9fdbf12cd89ba01f85cb8c46601271ae63e9016e..de42220f96f071711d6059d2d11b52e1cdfde129 100644 (file)
@@ -1151,7 +1151,11 @@ The list is updated automatically by `defun-rcirc-command'.")
                         (lambda (str) (concat (funcall rcirc-nick-filter str) ": "))
                         (rcirc-channel-nicks (rcirc-buffer-process)
                                             rcirc-target))))))
-        (list beg (point) table))))
+        (list beg (point)
+               (lambda (str pred action)
+                 (if (eq action 'metadata)
+                     '(metadata (cycle-sort-function . identity))
+                   (complete-with-action action table str pred)))))))
 
 (defun set-rcirc-decode-coding-system (coding-system)
   "Set the decode CODING-SYSTEM used in this channel."