Skip to content

Commit

Permalink
Try to not test the Vertico/Corfu packages on Emacs versions less tha…
Browse files Browse the repository at this point in the history
…n 27.
  • Loading branch information
okamsn committed Dec 25, 2023
1 parent a462959 commit 0822fed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 1 addition & 18 deletions vertico-prescient.el
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down

0 comments on commit 0822fed

Please sign in to comment.