From ac9710bf90011d0afb35aac46ca84094229bb409 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Wed, 1 Nov 2023 22:30:26 +0100 Subject: [PATCH] Remove 'completion-preview-default-predicate' This variable lacks a clear use case. * completion-preview.el (completion-preview-default-predicate): Remove. (completion-preview-show): Adapt. --- completion-preview.el | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/completion-preview.el b/completion-preview.el index 5e3ab54..ad3f9cf 100644 --- a/completion-preview.el +++ b/completion-preview.el @@ -67,13 +67,6 @@ after each command, and only displays the completion preview when all of the functions return non-nil." :type 'hook) -(defvar completion-preview-default-predicate #'always - "Completion predicate to use for completion preview by default. - -If a member of `completion-at-point-functions' returns a non-nil -`:predicate' completion property, then that predicate overrides -the default value that you specify in this option.") - (defvar completion-preview-sort-function #'completion-preview--sort-by-length-alpha "Sort function to use for choosing a completion candidate to preview.") @@ -119,8 +112,7 @@ Compatibility definition for `minibuffer--sort-by-length-alpha'." #'completion--capf-wrapper 'all))) (pcase res (`(,_ ,beg ,end ,table . ,plist) - (let* ((pred (or (plist-get plist :predicate) - completion-preview-default-predicate)) + (let* ((pred (plist-get plist :predicate)) (string (buffer-substring beg end)) (md (completion-metadata string table pred)) (sort-fn (or (completion-metadata-get md 'cycle-sort-function) -- 2.39.2