unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How to deal with 'function' not known to be defined
Date: Thu, 01 Oct 2020 19:51:40 +0200	[thread overview]
Message-ID: <87mu15ltqr.fsf@ebih.ebihd> (raw)
In-Reply-To: m2ft6xc15n.fsf@codeisgreat.org

Pankaj Jangid wrote:

> I have a lisp file `init-which-key.el` which is
> included in `~/.emacs.d/init.el`.
>
> #+BEGIN_SRC elisp
> (require 'package)
> (defun my/which-key-setup ()
>   "Startup configuration for which-key."
>   (unless (package-installed-p 'which-key)
>     (package-install 'which-key))
>
>   (which-key-mode 1))
>
> (my/which-key-setup)
> #+END_SRC
>
> Flymake reports one warning - "The function
> 'which-key-mode" is not known to be define.
>
> I know that 'which-key-mode' is not available till
> the package is installed. And flymake tries to
> compile and find errors and warnings.
>
> What are the best practices to write such modular
> files that are free from flymake warnings?
> Any pointers where I can read specifically on
> this topic?

(require 'which-key)

?

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




  reply	other threads:[~2020-10-01 17:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01 17:21 How to deal with 'function' not known to be defined Pankaj Jangid
2020-10-01 17:51 ` Emanuel Berg via Users list for the GNU Emacs text editor [this message]
2020-10-01 18:28 ` Stefan Monnier
2020-10-02  5:08   ` Emanuel Berg via Users list for the GNU Emacs text editor

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=87mu15ltqr.fsf@ebih.ebihd \
    --to=help-gnu-emacs@gnu.org \
    --cc=moasenwood@zoho.eu \
    /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.
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).