GNU bug report logs -
#71814
define-globalized-minor-mode Should predicate variable be defined before?
Previous Next
Reported by: "Elijah G." <eg642616 <at> gmail.com>
Date: Fri, 28 Jun 2024 06:06:01 UTC
Severity: normal
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
El vie., 28 de junio de 2024 9:27 p. m., Stefan Kangas <
stefankangas <at> gmail.com> escribió:
> "Elijah G." <eg642616 <at> gmail.com> writes:
>
> > Hello, i've noticed when defining a globalized minor mode using the
> > define-globalized-minor-mode macro, gives a byte-compile warning about
> > the auto-generated :predicate variable not being defined.
>
> Thanks for the bug report and proposed fix.
>
> Could you please provide a recipe to reproduce the problem?
>
Sure.
1. create a .el file
2. insert this snippet into to file:
```
(define-minor-mode test-mode "")
(define-globalized-minor-mode global-test-mode
test-mode #'ignore
:group 'test
:predicate '(prog-mode text-mode))
```
3. byte-compile the file
4. in the compile log buffer should appear this warning:
`Warning: reference to free variable ‘global-test-modes’`
which is the variable generated by the macro.
>
[Message part 2 (text/html, inline)]
This bug report was last modified 326 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.