From 8d3aeedc274a14041df44d0f08c776b0604171a8 Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Sat, 25 Sep 2021 03:32:36 +0900 Subject: [PATCH] Fix compile warnings --- emacs.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/emacs.el b/emacs.el index c9d5fdf..5973a03 100644 --- a/emacs.el +++ b/emacs.el @@ -450,10 +450,15 @@ Otherwize hook it." ;; (global-set-key (kbd "C-s") 'isearch-forward-regexp) ;; (global-set-key (kbd "C-r") 'isearch-backward-regexp) -(if (eval-and-compile (require 'prescient nil t)) - (set-variable 'search-default-mode - (lambda (orig lax) - (prescient-fuzzy-regexp orig))) +(if (locate-library "prescient") + (progn + (declare-function prescient-fuzzy-regexp + "prescient") + (autoload 'prescient-fuzzy-regexp + "prescient") + (set-variable 'search-default-mode + (lambda (orig lax) + (prescient-fuzzy-regexp orig)))) (set-variable 'search-default-mode t)) ;; (set-variable 'search-whitespace-regexp ".*?") ;; (set-variable 'isearch-regexp-lax-whitespace t)