all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#16771: 24.3.50; pcase generates irritating warnings
@ 2014-02-16 20:32 Helmut Eller
  2014-02-17  3:27 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Helmut Eller @ 2014-02-16 20:32 UTC (permalink / raw)
  To: 16771

Compiling this example:
  ;; -*-lexical-binding:t-*-
  (eval-when-compile
    (require 'pcase))
  
  (defun foo (x)
    (pcase x
      ((and `(,sym)
            (guard (symbolp sym)))
       t)))

with emacs -batch -f batch-byte-compile foo.el produces this output:

  In toplevel form:
  foo.el:5:1:Warning: Unused lexical variable `sym'
  Wrote /tmp/foo.elc

This warning is annoying as sym is obviously used in the guard
expression and replacing sym with _sym also doesn't help because that
produces

  foo.el:5:1:Warning: variable `_sym' not left unused

In GNU Emacs 24.3.50.6 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2014-02-14 on ix





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#16771: 24.3.50; pcase generates irritating warnings
  2014-02-16 20:32 bug#16771: 24.3.50; pcase generates irritating warnings Helmut Eller
@ 2014-02-17  3:27 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2014-02-17  3:27 UTC (permalink / raw)
  To: Helmut Eller; +Cc: 16771

> This warning is annoying

Agreed.  I have the impression we already have a bug-number for this
one, but maybe not.
I don't know yet how to fix this, sadly,


        Stefan





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-17  3:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-16 20:32 bug#16771: 24.3.50; pcase generates irritating warnings Helmut Eller
2014-02-17  3:27 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.