branch: scratch/editorconfig-cc commit 26c875d609d86327343bd1f3aa80a27b7d25410c Author: 10sr <8.slas...@gmail.com> Commit: Stefan Monnier <monn...@iro.umontreal.ca>
Define -mode-apply as an interactive command (#216) --- editorconfig.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/editorconfig.el b/editorconfig.el index 5705cc2546..e45c914678 100644 --- a/editorconfig.el +++ b/editorconfig.el @@ -500,8 +500,10 @@ It calls `editorconfig-get-properties-from-exec' if ;;;###autoload (defun editorconfig-apply () "Get and apply EditorConfig properties to current buffer. -This function ignores `editorconfig-exclude-modes' and -`editorconfig-exclude-regexps', and always applies available properties." + +This function does not respect the values of `editorconfig-exclude-modes' and +`editorconfig-exclude-regexps' and always applies available properties. +Use `editorconfig-mode-apply' instead to make use of these variables." (interactive) (when buffer-file-name (condition-case err @@ -539,9 +541,11 @@ This function ignores `editorconfig-exclude-modes' and (defun editorconfig-mode-apply () "Get and apply EditorConfig properties to current buffer. + This function does nothing when the major mode is listed in `editorconfig-exclude-modes', or variable `buffer-file-name' matches any of regexps in `editorconfig-exclude-regexps'." + (interactive) (when (and major-mode (not (memq major-mode editorconfig-exclude-modes))