]> git.eshelyaron.com Git - completion-preview.git/commitdiff
Remove 'completion-preview-default-predicate'
authorEshel Yaron <me@eshelyaron.com>
Wed, 1 Nov 2023 21:30:26 +0000 (22:30 +0100)
committerEshel Yaron <me@eshelyaron.com>
Wed, 1 Nov 2023 21:30:26 +0000 (22:30 +0100)
This variable lacks a clear use case.

* completion-preview.el (completion-preview-default-predicate): Remove.
(completion-preview-show): Adapt.

completion-preview.el

index 5e3ab549556b76323e9c0426f3cfa1d445e76296..ad3f9cf3a4c6b2d4a5e5c8da195cb277a0213cf9 100644 (file)
@@ -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)