branch: scratch/editorconfig-cc commit 0a319fab7845153a91fbd12ff1174f2808e2ed2c Author: 10sr <8slashes+...@gmail.com> Commit: Stefan Monnier <monn...@iro.umontreal.ca>
Add global minor mode --- editorconfig.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/editorconfig.el b/editorconfig.el index f362ea7061..488b6aa882 100644 --- a/editorconfig.el +++ b/editorconfig.el @@ -132,6 +132,16 @@ property emacs_linum to decide whether to show line numbers on the left (funcall hook props))) (display-warning :error "EditorConfig core program is not available. Styles will not be applied.")))) +;;;###autoload +(define-minor-mode edconf-mode + "Toggle EditorConfig feature." + :global t + :lighter "" + (if edconf-mode + (add-hook 'find-file-hook + 'edconf-find-file-hook) + (remove-hook 'find-file-hook + 'edconf-find-file-hook))) ;;;###autoload (add-to-list 'auto-mode-alist '("/\\.editorconfig\\'" . conf-unix-mode))