emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/el-search 3b5cce3 043/332: fix compiler errors and warn


From: Stefan Monnier
Subject: [elpa] externals/el-search 3b5cce3 043/332: fix compiler errors and warnings
Date: Tue, 1 Dec 2020 15:48:07 -0500 (EST)

branch: externals/el-search
commit 3b5cce3edc4e50207a70d52158a289e495363fc5
Author: Michael Heerdegen <michael_heerdegen@web.de>
Commit: Michael Heerdegen <michael_heerdegen@web.de>

    fix compiler errors and warnings
---
 el-search.el | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/el-search.el b/el-search.el
index 0a12113..b286e07 100644
--- a/el-search.el
+++ b/el-search.el
@@ -231,6 +231,7 @@
 (require 'cl-lib)
 (require 'elisp-mode)
 (require 'thingatpt)
+(require 'help-fns) ;el-search--make-docstring
 
 
 ;;;; Configuration stuff
@@ -284,6 +285,8 @@ prompt to refer to the value of the currently tested 
expression."
     (read-from-minibuffer prompt initial-contents 
el-search-read-expression-map read
                           (or hist 'read-expression-history) default)))
 
+(defvar el-search--initial-mb-contents nil)
+
 (defun el-search--read-pattern (prompt &optional default read)
   (let ((this-sexp (sexp-at-point)))
     (minibuffer-with-setup-hook
@@ -341,7 +344,6 @@ Point must not be inside a string or comment."
   ;; code mainly from `pcase--make-docstring'
   (let* ((main (documentation (symbol-function 'el-search-pattern) 'raw))
          (ud (help-split-fundoc main 'pcase)))
-    (require 'help-fns)
     (with-temp-buffer
       (insert (or (cdr ud) main))
       (mapc
@@ -437,13 +439,14 @@ this pattern type."
      ,@body))
 
 (defun el-search--matcher (pattern &rest body)
-  (let ((warning-suppress-log-types '((bytecomp))))
-    (el-search--with-additional-pcase-macros
-     (byte-compile
-      `(lambda (expression)
-         (pcase expression
-           (,pattern ,@(or body (list t)))
-           (_        nil)))))))
+  (eval
+   `(el-search--with-additional-pcase-macros
+     (let ((warning-suppress-log-types '((bytecomp))))
+       (byte-compile
+        (lambda (expression)
+          (pcase expression
+            (,pattern ,@(or body (list t)))
+            (_        nil))))))))
 
 (defun el-search--match-p (matcher expression)
   (funcall matcher expression))
@@ -686,10 +689,6 @@ The following additional pattern types are currently 
defined:\n"
              (if (zerop nbr-skipped)  ""
                (format "   (%d skipped)" nbr-skipped)))))
 
-;; We need a variable for the initial contents because we want to 
`call-interactively'
-;; `el-search-query-replace-read-args'
-(defvar el-search--initial-mb-contents nil)
-
 (defun el-search-query-replace-read-args ()
   (barf-if-buffer-read-only)
   (let* ((from (el-search--read-pattern "Replace from: "))



reply via email to

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