Commit 55478e4a authored by João Távora's avatar João Távora
Browse files

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.
parent 37003753
......@@ -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));
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");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment