seagle0128 / doom-modeline

A fancy and fast mode-line inspired by minimalism design.
https://seagle0128.github.io/doom-modeline/
GNU General Public License v3.0
1.27k stars 157 forks source link

[Bug] Compiler warnings after 311a0c5 #702

Closed dr-scsi closed 6 months ago

dr-scsi commented 6 months ago

Thank you for the bug report

Bug description

After the commit 311a0c5, compiler says:

In end of data:
doom-modeline-segments.el:3130:27: Warning: the function ‘svg-image’ is not
    known to be defined.
doom-modeline-segments.el:3106:6: Warning: the function ‘svg-line’ is not
    known to be defined.
doom-modeline-segments.el:3102:6: Warning: the function ‘svg-circle’ is not
    known to be defined.
doom-modeline-segments.el:3101:15: Warning: the function ‘svg-create’ is not
    known to be defined.

Steps to reproduce

Start Emacs with -Q, byte-compile the files and check the *Compile-Log* buffer.

Expected behavior

No compiler warnings.

OS

MacOS

Emacs Version

30 (gccemacs)

Emacs Configurations

No response

Error callstack

N/A

Anything else

You can silence this by adding (which I haven't tested):

(eval-when-compile
  (require 'svg))

at the beginning of doom-modeline-segments.el, or declare the functions. Which one is a matter of taste.

dr-scsi commented 6 months ago

Thanks, the warnings are gone now 👍