From edf24a0263ce13b7d99da40ab497cc559bf76ce2 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 17 Jun 2024 10:54:25 -0400 Subject: [PATCH] Remove support for `editorconfig-override-*-local-variables` With the Emacs-30 hooks we can't easily override file-local settings and we can't easily control whether we override dir-local settings, so we remove support for those config vars. * lisp/editorconfig.el (editorconfig-override-file-local-variables) (editorconfig-override-dir-local-variables): Remove custom vars. (editorconfig--should-set): Presume they were nil. (cherry picked from commit 8cfa6fe80128da62d28da37c5baedd201b796bb8) --- lisp/editorconfig.el | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/lisp/editorconfig.el b/lisp/editorconfig.el index 5c74e35fc52..c873700a041 100644 --- a/lisp/editorconfig.el +++ b/lisp/editorconfig.el @@ -237,16 +237,6 @@ number - `lisp-indent-offset' is not set only if indent_size is equal to this number. For example, if this is set to 2, `lisp-indent-offset' will not be set only if indent_size is 2.") -(defcustom editorconfig-override-file-local-variables t - "Non-nil means editorconfig will override file local variable values." - :type 'boolean - :group 'editorconfig) - -(defcustom editorconfig-override-dir-local-variables t - "Non-nil means editorconfig will override values defined in dir-locals.el ." - :type 'boolean - :group 'editorconfig) - (define-error 'editorconfig-error "Error thrown from editorconfig lib") @@ -293,13 +283,11 @@ See `editorconfig-lisp-use-default-indent' for details." symbol size) :debug) - (when (and (not editorconfig-override-file-local-variables) - (assq symbol file-local-variables-alist)) + (when (assq symbol file-local-variables-alist) (cl-return-from editorconfig--should-set nil)) - (when (and (not editorconfig-override-dir-local-variables) - (assq symbol dir-local-variables-alist)) + (when (assq symbol dir-local-variables-alist) (cl-return-from editorconfig--should-set nil)) -- 2.39.2