[Top][All Lists]

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

Re: [elpa] master f00887c: Explicitly require pcase

From: Stefan Monnier
Subject: Re: [elpa] master f00887c: Explicitly require pcase
Date: Sun, 23 Apr 2017 18:43:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

>> >     Explicitly require pcase
>> >     emacs -Q doesn't load pcase any more.
>> But pcase macros are autoloaded.  So what breaks if you don't (require
>> 'pcase)?
> This unorthodox thing would break:
> #+begin_src emacs-lisp
> (defun el-search--matcher (pattern &optional result)
>   (eval ;use `eval' to allow for user defined pattern types at run time
>    (let ((expression (make-symbol "expression")))
>      `(el-search--with-additional-pcase-macros
>        (let ((byte-compile-debug t) ;make undefined pattern types raise an 
> error
>              (warning-suppress-log-types '((bytecomp)))
>              (pcase--dontwarn-upats (cons '_ pcase--dontwarn-upats)))
>          (byte-compile (lambda (,expression)
>                          (pcase ,expression
>                            (,pattern ,(or result t))
>                            (_        nil)))))))))
> #+end_src

I see.  That probably deserves a comment.


reply via email to

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