help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to deal with 'function' not known to be defined


From: Emanuel Berg
Subject: Re: How to deal with 'function' not known to be defined
Date: Thu, 01 Oct 2020 19:51:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]