all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Yuri Khan <yuri.v.khan@gmail.com>
Cc: 27545@debbugs.gnu.org, 25558@debbugs.gnu.org
Subject: bug#25558: Spurious warnings with variables mentioned only pcase guard patterns
Date: Fri, 03 Sep 2021 10:49:09 +0200	[thread overview]
Message-ID: <871r6611tm.fsf@gnus.org> (raw)
In-Reply-To: <CAP_d_8VmbLtZus5rwj5pATk3V1PU9X5thUMb+VQdqKZYFsA9zA@mail.gmail.com> (Yuri Khan's message of "Sat, 1 Jul 2017 17:01:17 +0700")

Yuri Khan <yuri.v.khan@gmail.com> writes:

> C-x C-f test.el RET
>
> ;; -*- lexical-binding: t -*-
>
> (defun foo (x)
>   (pcase x
>     ((and `(,bar ,baz)
>           (guard (eq bar 'quux)))
>      baz)))
>
> C-x C-s
> M-x byte-compile RET test.el RET
>
> Observed output:
>
> Compiling file /home/yuri/test.el at Sat Jul  1 16:27:36 2017
> test.el:3:1:Warning: Unused lexical variable ‘bar’

I can reproduce this in Emacs 26.1, but not in Emacs 28, so I'm guessing
that this is fixed, and I'm closing this bug report.  If there's still
problems here, please respond to the debbugs address and we'll reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2021-09-03  8:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-01 10:01 bug#27545: 25.1; Unused lexical variable when byte-compiling pcase with guards Yuri Khan
2021-09-03  8:49 ` Lars Ingebrigtsen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-01-28  0:14 bug#25558: Spurious warnings with variables mentioned only pcase guard patterns Clément Pit--Claudel
2017-01-28  0:24 ` npostavs

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871r6611tm.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=25558@debbugs.gnu.org \
    --cc=27545@debbugs.gnu.org \
    --cc=yuri.v.khan@gmail.com \
    /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 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.