From: Eli Zaretskii <eliz@gnu.org>
To: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Cc: 69120@debbugs.gnu.org
Subject: bug#69120: Spurious "function is not known to be defined" if defined in `use-package` body
Date: Wed, 14 Feb 2024 18:38:01 +0200 [thread overview]
Message-ID: <867cj7xaqe.fsf@gnu.org> (raw)
In-Reply-To: <379435a543c0fb73d4f0ede0fd8c82b4134ec41d.camel@yandex.ru> (message from Konstantin Kharlamov on Wed, 14 Feb 2024 19:10:54 +0300)
> From: Konstantin Kharlamov <Hi-Angel@yandex.ru>
> Cc: 69120@debbugs.gnu.org
> Date: Wed, 14 Feb 2024 19:10:54 +0300
>
> On Wed, 2024-02-14 at 18:07 +0200, Eli Zaretskii wrote:
> > > From: Konstantin Kharlamov <Hi-Angel@yandex.ru>
> > > Cc: 69120@debbugs.gnu.org
> > > Date: Wed, 14 Feb 2024 18:28:15 +0300
> > >
> > > > > test.el:6:4: Warning: the function ‘hello’ is not known to
> > > > > be
> > > > > defined.
> > > >
> > > > What do you get if you macro-expand your code?
> > >
> > > Wrapping the above code to a `(macroexpand …)` gives a:
> > >
> > > "hello"
> > > nil
> >
> > You need to quote the form you pass to macroexpand, to get the
> > expansion, I think.
>
> Oh indeed you're right!
>
> It gives me the following:
>
> (progn (defvar use-package--warning196 #'(lambda (keyword err) (let ((msg (format "%s/%s: %s" 'prog-mode keyword (error-message-string err)))) (display-warning 'use-package msg :error)))) (condition-case-unless-debug err (progn (condition-case-unless-debug err (progn (defun hello nil (print "hello")) (hello)) (error (funcall use-package--warning196 :init err))) (if (not (require 'prog-mode nil t)) (display-warning 'use-package (format "Cannot load %s" 'prog-mode) :error))) (error (funcall use-package--warning196 :catch err))))
And that doesn't explain the warning?
next prev parent reply other threads:[~2024-02-14 16:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 11:16 bug#69120: Spurious "function is not known to be defined" if defined in `use-package` body Konstantin Kharlamov
2024-02-14 15:23 ` Eli Zaretskii
2024-02-14 15:28 ` Konstantin Kharlamov
2024-02-14 16:07 ` Eli Zaretskii
2024-02-14 16:10 ` Konstantin Kharlamov
2024-02-14 16:38 ` Eli Zaretskii [this message]
2024-02-14 16:58 ` Konstantin Kharlamov
2024-02-15 3:57 ` Konstantin Kharlamov
2024-02-15 4:00 ` Konstantin Kharlamov
2024-02-15 6:51 ` Eli Zaretskii
2024-02-15 15:21 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
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=867cj7xaqe.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=69120@debbugs.gnu.org \
--cc=Hi-Angel@yandex.ru \
/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.