From 0822fed4393958ba39af720f29bccde2d83cff84 Mon Sep 17 00:00:00 2001 From: okamsn Date: Mon, 25 Dec 2023 11:44:17 -0500 Subject: [PATCH] Try to not test the Vertico/Corfu packages on Emacs versions less than 27. --- .github/workflows/ci.yml | 6 ++---- Makefile | 1 + vertico-prescient.el | 19 +------------------ 3 files changed, 4 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34c52d7..49b04e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,5 @@ jobs: env: VERSION: ${{ matrix.emacs_version }} TARGET: ${{ matrix.make_target }} - run: | - echo "Emacs version is: $VERSION" - >- - make docker CMD="make -k $TARGET VERSION=$VERSION" + run: >- + make docker CMD="make -k $TARGET VERSION=$VERSION" diff --git a/Makefile b/Makefile index 9a0fc7b..9b00ed7 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ CMD ?= EMACS ?= emacs + # The order is important for compilation. # # Get all files that we might wish to to test compilation, then remove diff --git a/vertico-prescient.el b/vertico-prescient.el index f3c74f8..de1fcba 100644 --- a/vertico-prescient.el +++ b/vertico-prescient.el @@ -141,23 +141,6 @@ trailing directory separator as needed." vertico-directory-enter) "Commands that trigger `prescient-remember' after running.") -(declare-function vertico-prescient--minibuffer-active-p - "ext:vertico-prescient") -(if (let ((upper-bound (cdr (func-arity 'minibufferp)))) - (or (eq t upper-bound) - (>= 2 upper-bound))) - (defun vertico-prescient--minibuffer-active-p (buf) - "Check if BUF minibuffer is a minibuffer and is active." - (minibufferp buf t)) - (defun vertico-prescient--minibuffer-active-p (buf) - "Check if BUF minibuffer is a minibuffer and is active." - (and (minibufferp buf) - (/= 0 (minibuffer-depth)) - ;; There is an internal list of minibuffers that doesn't seem - ;; accessible from Lisp, so we use this approximation: - (eq (active-minibuffer-window) (get-buffer-window buf)) - (eq (active-minibuffer-window) (selected-window))))) - (defun vertico-prescient--remember-inserted-candidate () "Remember the minibuffer contents as a candidate after insertion commands. @@ -166,7 +149,7 @@ Such commands are listed in `vertico-prescient--insertion-commands'." ;; Try to avoid running the remembrance function twice ;; for commands that can insert and exit. ;; This might not be needed? - (vertico-prescient--minibuffer-active-p (current-buffer))) + (minibufferp (current-buffer) t)) (vertico-prescient--remember-minibuffer-contents))) (defvar vertico-prescient--exit-commands