2

I'm using Emacs 29.0.60

If I open emacs -q, open a Emacs Lisp buffer with FlyMake enabled and type this:

;;; init.el --- summary

;;; Commentary:

;;; Code:

(setq var1 2)
(customize-set-variable var2 2)
(setopt var3 2)

(provide 'init)
;;; init.el ends here

FlyMake will give me only two warnings:

7   6 warning  e-f-b-c  assignment to free variable ‘var1’
8  24 warning  e-f-b-c  reference to free variable ‘var2’

Why setopt is not underlined here? I know it's a new macro introduced in Emacs 29 but I wonder if it is intended to be like this or the linter is just misbehaving here.

cidra
  • 135
  • 5
  • 1
    You might get a useful answer here. Otherwise, consider `M-x report-emacs-bug`. Emacs developers will (politely) let you know whether they think there's a problem to be fixed, etc. And if there is, they'll thank you for reporting it. – Drew Apr 15 '23 at 20:43
  • 1
    I'm guessing that `flymake` does not know about `setopt`. Consider adding an issue on the [Github repo](https://github.com/flymake/emacs-flymake/issues). – NickD Apr 16 '23 at 00:43
  • 1
    @Drew I've sent a [bug report](https://lists.gnu.org/archive/html/bug-gnu-emacs/2023-04/msg01133.html) as you suggested. It seems that (setopt ...) is intended to work this way. – cidra Apr 23 '23 at 14:24

0 Answers0