bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#16771: 24.3.50; pcase generates irritating warnings


From: Helmut Eller
Subject: bug#16771: 24.3.50; pcase generates irritating warnings
Date: Sun, 16 Feb 2014 21:32:58 +0100

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





reply via email to

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