Open ed9w2in6 opened 1 year ago
May I ask if this is acceptable for this package to add a formatter that depends on another emacs package?
Yes, absolutely. The following already supported formatters are Emacs-native:
Of these, at least ledger-mode is a third-party package that does not ship with Emacs.
For native formatters, the main thing is to use (funcall 'elisp-autofmt-region ...)
instead of (elisp-autofmt-region ...)
. The later form assumes that the function is defined, which it won't be if the package is not installed.
We don't currently have a standard way to check whether or not a native package has been installed. I can add that at some point. For now, your code above is fine. Just do the funcall
thing.
I have added this formatter in my own config:
I have been using this for a while, which works pretty well, and IMHO much better than the default one (Emacs).
May I ask if this is acceptable for this package to add a formatter that depends on another emacs package? And what do you expect in a pull request?