From 27070b0c47354b533273743eafda88ed5e4286ad Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sat, 14 Feb 2026 12:41:49 +0100 Subject: [PATCH] ; completion-preview.el: Refine recent addition. * lisp/completion-preview.el (completion-preview-inhibit-functions): Reposition, add :version tag. --- lisp/completion-preview.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lisp/completion-preview.el b/lisp/completion-preview.el index 5a1a6b5ed43..ff348ebf9af 100644 --- a/lisp/completion-preview.el +++ b/lisp/completion-preview.el @@ -176,6 +176,14 @@ after non-symbol characters, such as punctuation or whitespace." (const :tag "Disable minimum symbol length requirement" nil)) :version "30.1") +(defcustom completion-preview-inhibit-functions nil + "Abnormal hook for inhibiting Completion Preview mode operation. +Completion Preview mode calls the functions on this hook without +arguments during `post-command-hook'. If any of these functions returns +non-nil, it inhibits the preview display." + :type 'hook + :version "31.1") + (defcustom completion-preview-message-format "Completion suggestion %i out of %n" "Message to show after cycling the completion preview suggestion. @@ -619,13 +627,6 @@ point, otherwise hide it." (selected-window) (current-buffer))) (completion-preview--try-update))) -(defcustom completion-preview-inhibit-functions nil - "Abnormal hook for inhibiting Completion Preview mode operation. -Completion Preview mode calls the functions on this hook without -arguments during `post-command-hook'. If any of these functions returns -non-nil, it inhibits the preview display." - :type 'hook) - (defun completion-preview--post-command () "Create, update or delete completion preview post last command." (let ((internal-p (or completion-preview--inhibit-update-p