Subject: Re: bug#28107: 26.0.50; Byte compilation shows an unused var warning for an used variable

From: Glenn Morris <[email-masked]>
Date: Thu, 17 Aug 2017 21:42:32 -0400

Tino Calancha wrote:

> ;; -*- lexical-binding: t; -*-
> (let ((x 1))
>   (and (equal (+ x 2) 3)))

This code also does nothing. Compare with:

(defun foo ()
  (let ((x 1))
   (and (equal (+ x 2) 3))))

where the result is used (as the function return) and there is no warning.