Let bind major-mode-remap-alist around set-auto-mode-0 instead of using setq-local, and only consider the mode being switched to.
Fixes #84. After doing some more testing this was actually caused by interaction between other plugins (my editorconfig setup) causing set-auto-mode-0 to be called 20+ times when opening a file.
Still, this should be an improvement over the old method using setq-local and provides a small performance boost. Let me know if you think there are any potential issues with this method.
I also added autoload cookies for some of the commands. For now I just left the globalized minor mode alone because adding an autoload cookie will cause an error since it will pull in the cl-loop from :predicate into the autoloads file (and the struct doesn't exist yet).
Let bind major-mode-remap-alist around set-auto-mode-0 instead of using setq-local, and only consider the mode being switched to.
Fixes #84. After doing some more testing this was actually caused by interaction between other plugins (my editorconfig setup) causing set-auto-mode-0 to be called 20+ times when opening a file.
Still, this should be an improvement over the old method using setq-local and provides a small performance boost. Let me know if you think there are any potential issues with this method.
I also added autoload cookies for some of the commands. For now I just left the globalized minor mode alone because adding an autoload cookie will cause an error since it will pull in the cl-loop from :predicate into the autoloads file (and the struct doesn't exist yet).