From: Elijah G <eg642616@gmail.com>
To: Stefan Kangas <stefankangas@gmail.com>
Cc: 71814@debbugs.gnu.org
Subject: bug#71814: define-globalized-minor-mode Should predicate variable be defined before?
Date: Fri, 28 Jun 2024 22:33:25 -0600 [thread overview]
Message-ID: <CACnP4NJW1rO+demOCLg-F6SDZf9TSXZAMoG66JTn4sX7MLHeDg@mail.gmail.com> (raw)
In-Reply-To: <CADwFkmkabrjv_5Vcag6o9LHpr=U0YofL-3f_9Pk_rC=7qw=9TQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 912 bytes --]
El vie., 28 de junio de 2024 9:27 p. m., Stefan Kangas <
stefankangas@gmail.com> escribió:
> "Elijah G." <eg642616@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.
>
[-- Attachment #2: Type: text/html, Size: 1817 bytes --]
next prev parent reply other threads:[~2024-06-29 4:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-28 1:20 bug#71814: define-globalized-minor-mode Should predicate variable be defined before? Elijah G.
2024-06-29 3:27 ` Stefan Kangas
2024-06-29 4:33 ` Elijah G [this message]
2024-06-29 12:43 ` Stefan Kangas
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACnP4NJW1rO+demOCLg-F6SDZf9TSXZAMoG66JTn4sX7MLHeDg@mail.gmail.com \
--to=eg642616@gmail.com \
--cc=71814@debbugs.gnu.org \
--cc=stefankangas@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).