From: Michael Heerdegen <michael_heerdegen@web.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [elpa] master f00887c: Explicitly require pcase
Date: Sun, 23 Apr 2017 23:35:59 +0200 [thread overview]
Message-ID: <87shkybydc.fsf@drachen> (raw)
In-Reply-To: <jwv8tmrp7h5.fsf-monnier+emacsdiffs@gnu.org> (Stefan Monnier's message of "Sun, 23 Apr 2017 09:41:25 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> > 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
Before I call `pcase' the first time, I want to add to the binding of
`pcase--dontwarn-upats' which would not be defined at that point of time
when I don't require pcase before. AFAIR the only purpose is to
suppress a compiler warning in some corner cases, like searching for
`_'.
Regards,
Michael.
next prev parent reply other threads:[~2017-04-23 21:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170423050137.9474.12867@vcs0.savannah.gnu.org>
[not found] ` <20170423050138.63CA221037@vcs0.savannah.gnu.org>
2017-04-23 13:41 ` [elpa] master f00887c: Explicitly require pcase Stefan Monnier
2017-04-23 21:35 ` Michael Heerdegen [this message]
2017-04-23 22:43 ` Stefan Monnier
2017-04-24 3:22 ` Michael Heerdegen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87shkybydc.fsf@drachen \
--to=michael_heerdegen@web.de \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).