rougier / svg-lib

Emacs SVG libraries for creatings tags, icons and bars
GNU General Public License v3.0
335 stars 30 forks source link

Delay init of default face. Fixes #18 #44

Closed storvik closed 4 months ago

storvik commented 5 months ago

I have tried to figure out how to delay init of default style in order to fix #18. This pr seems to fix the issue for me. I have tested it using org-mode tags and running emacs in daemon mode.

The solution sets svg-lib-style-default to nil and introduces a getter that gets the value, or computes defaults if no value is set. The downside is that svg-lib-style-default shouldn't be accessed directly anymore, but the upside is that the change to the codebase is pretty small.

My elisp experience is not that good, so any suggestions for improvement is welcomed!

rougier commented 4 months ago

Thanks! Forgot to ask you if you signed the copyright assignment

storvik commented 4 months ago

I signed the assignment last week, so I guess everything is in order to merge this.