0

My init-which-key.el contains the following code,

(require 'package)
(defun my/which-key-setup ()
  "Startup configuration for which-key."
  (unless (package-installed-p 'which-key)
    (package-install 'which-key))

  (declare-function which-key-mode "which-key")
  (which-key-mode 1))

(my/which-key-setup)

(provide 'init-which-key)

And I include this file in my ~/.emacs.d/init.el. Like this,

(eval-and-compile
  (add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory)))
(require 'init-which-key)

when I compile init.el using batch mode, it reports

In toplevel form:
init.el:40:1: Error: Symbol's function definition is void: which-key-mode

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.