[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy 20d78ae 1/2: Fix byte-compilation warning on Emacs

From: Basil L. Contovounesios
Subject: [elpa] externals/ivy 20d78ae 1/2: Fix byte-compilation warning on Emacs --without-x
Date: Fri, 30 Jul 2021 13:50:57 -0400 (EDT)

branch: externals/ivy
commit 20d78ae4fe2b128411f0ddb0aa22ba25aa5d6d3f
Author: akater <nuclearspace@gmail.com>
Commit: Basil L. Contovounesios <contovob@tcd.ie>

    Fix byte-compilation warning on Emacs --without-x
    * ivy.el (ivy--minibuffer-setup): Modify mwheel variables only after
    the library has been loaded (PR #2900).
    Copyright-paperwork-exempt: yes
 ivy.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/ivy.el b/ivy.el
index 659ba3e..c693ab7 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2986,8 +2986,11 @@ tries to ensure that it does not change depending on the 
number of candidates."
 (defun ivy--minibuffer-setup ()
   "Setup ivy completion in the minibuffer."
-  (setq-local mwheel-scroll-up-function 'ivy-next-line)
-  (setq-local mwheel-scroll-down-function 'ivy-previous-line)
+  ;; Guard for --without-x builds where `mwheel' is not preloaded.
+  (when (boundp 'mwheel-scroll-up-function)
+    (setq-local mwheel-scroll-up-function 'ivy-next-line))
+  (when (boundp 'mwheel-scroll-down-function)
+    (setq-local mwheel-scroll-down-function 'ivy-previous-line))
   (setq-local completion-show-inline-help nil)
   (setq-local line-spacing nil)
   (setq-local minibuffer-default-add-function

reply via email to

[Prev in Thread] Current Thread [Next in Thread]