From: Konstantin Kharlamov <Hi-Angel@yandex.ru>
To: emacs-devel@gnu.org
Subject: How to avoid "unknown function" warning for *very* optional functional
Date: Sat, 10 Feb 2024 01:25:30 +0300 [thread overview]
Message-ID: <602b62e271bda53e3ee79d6fe6df502ae6507b06.camel@yandex.ru> (raw)
I'm fixing warnings in some of Emacs packages I'm using, and I found in
`meson-mode` this construct:
(defun meson-lookup-doc (identifier)
…
(when (bound-and-true-p evil-mode)
(evil-local-set-key 'normal (kbd "q") 'bury-buffer)))
…
This basically a small help to those using both evil-mode and `meson-mode`. And this
triggers a byte-compilation warning:
meson-mode.el:958:12: Warning: the function ‘evil-local-set-key’ is not known to be defined.
I'm not exactly sure what's the proper way to fix this? It's not even an optional
package, so `require` or `(cl-eval-when 'compile …` are not suitable here. It's just
that: "change behavior in this one function if another mode is present".
next reply other threads:[~2024-02-09 22:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 22:25 Konstantin Kharlamov [this message]
2024-02-10 0:08 ` How to avoid "unknown function" warning for *very* optional functional Joost Kremers
2024-02-10 8:55 ` Konstantin Kharlamov
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=602b62e271bda53e3ee79d6fe6df502ae6507b06.camel@yandex.ru \
--to=hi-angel@yandex.ru \
--cc=emacs-devel@gnu.org \
/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).