From: João Távora Date: Mon, 18 Feb 2019 20:32:38 +0000 (+0000) Subject: switch-to-buffer's completion table uses its own sorting X-Git-Tag: emacs-27.0.90~3575 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=55478e4ad724fcc1194c9556b7699e6144e64971;p=emacs.git switch-to-buffer's completion table uses its own sorting * src/minibuf.c (Finternal_complete_buffer): Add Qcycle_sort_function to completion table's metadata. (syms_of_minibuf): New symbol Qcycle_sort_function. --- diff --git a/src/minibuf.c b/src/minibuf.c index 321fda1ba88..b23e24c4bd9 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1801,7 +1801,9 @@ If FLAG is nil, invoke `try-completion'; if it is t, invoke else if (EQ (flag, Qlambda)) return Ftest_completion (string, Vbuffer_alist, predicate); else if (EQ (flag, Qmetadata)) - return list2 (Qmetadata, Fcons (Qcategory, Qbuffer)); + return list3 (Qmetadata, + Fcons (Qcategory, Qbuffer), + Fcons (Qcycle_sort_function, Qidentity)); else return Qnil; } @@ -1922,6 +1924,8 @@ syms_of_minibuf (void) DEFSYM (Qactivate_input_method, "activate-input-method"); DEFSYM (Qcase_fold_search, "case-fold-search"); DEFSYM (Qmetadata, "metadata"); + DEFSYM (Qcycle_sort_function, "cycle-sort-function"); + /* A frame parameter. */ DEFSYM (Qminibuffer_exit, "minibuffer-exit");