3

I have, for instance, this in my .emacs:

(use-package company
  :bind (("M-RET" . company-complete))
  :demand                               ; load it now (better for eglot)
  :config
  (global-company-mode)
  (setq company-backends '(company-capf company-semantic company-dabbrev-code
                                        company-dabbrev company-etags
                                        company-keywords))
  (setq company-dabbrev-downcase nil ; make case-sensitive
    company-dabbrev-ignore-case nil) ; make case-sensitive
)

The last setq gives flycheck free-variable warnings for company-dabbrev-downcase and company-dabbrev-ignore-case even though they are both defined with defcustom in company-mode. Should I just ignore these warnings, or should I do something differently to fix them?

NickD
  • 29,717
  • 3
  • 27
  • 44
GaryO
  • 496
  • 2
  • 17

1 Answers1

3

You could try the :defines keyword in use-package. According to use-package's README it's for "introduce[ing] dummy variable and function declarations solely for the sake of the byte-compiler".

(use-package company
  :defines company-dabbrev-downcase company-dabbrev-ignore-case
  ...)
Aquaactress
  • 1,453
  • 8
  • 11