AndreaCrotti / yasnippet-snippets

a collection of yasnippet snippets for many languages
GNU General Public License v3.0
1.17k stars 465 forks source link

*yasnippet-snippets.el: avoid duplicate loading on initialize the snippets #468

Closed sunlin7 closed 11 months ago

sunlin7 commented 1 year ago

Hi,

The (yasnippet-snippets-initialize) will be called twice for the yasnippet-snippets installed by package.el. It happened for the eval-after-load is marked as ;;;autoload, it will appear in the file yasnippet-snippets-autoloads.el which is generated by the package,el, then the function will be called in the autoloads file and the main file. https://github.com/AndreaCrotti/yasnippet-snippets/blob/8e4c521252501dd9ad71ea78fae14683ab7a14cb/yasnippet-snippets.el#L73-L75

This change will detect the duplicate call and ignore it. Please help review and merge the the patch. Thanks.

AndreaCrotti commented 11 months ago

Thanks!