@subsubsection Per-Directory Variables via EditorConfig
@cindex EditorConfig support
-The EditorConfig standard is an alternative to the @code{.dir-locals.el}
+The EditorConfig standard is an alternative to the @file{.dir-locals.el}
files, which can control only a very small number of variables, but
has the advantage of being editor-neutral. Those settings are stored in
-files named @code{.editorconfig}.
+files named @file{.editorconfig}.
If you want Emacs to obey those settings, you need to enable
the @code{editorconfig-mode} minor mode. This is usually all that is
-needed: when the mode is activated, Emacs will look for @code{.editorconfig}
-files whenever a file is visited, just as it does for @code{.dir-locals.el}.
-
-When both @code{.editorconfig} and @code{.dir-locals.el} files are
-encountered, the corresponding settings are combined, and in case there
-is overlap, the settings coming from the nearest file take precedence.
+needed: when the mode is activated, Emacs will look for @file{.editorconfig}
+files whenever a file is visited, just as it does for @file{.dir-locals.el}.
+When both @file{.editorconfig} and @file{.dir-locals.el} files are
+found, their settings are combined, and in case of a conflict, the
+setting coming from the closest file takes precedence.
+If they are equally close, @file{.dir-locals.el} takes precedence.
+In terms of security, those settings are subject to the same checks
+as those coming from @file{.dir-locals.el} (and also honor
+@code{enable-local-variables}).
The @code{indent_size} setting of the EditorConfig standard does not
correspond to a fixed variable in Emacs, but instead needs to set
the @code{editorconfig-indentation-alist} variable to tell Emacs which
variables need to be set in that major mode.
-Similarly, there are several different ways to ``trim whitespace'' at
+Similarly, there are several different ways to trim whitespace at
the end of lines. When the EditorConfig @code{trim_trailing_whitespace}
setting is used, by default @code{editorconfig-mode} simply calls
@code{delete-trailing-whitespace} every time you save your file.
* New Modes and Packages in Emacs 30.1
** New package EditorConfig.
-This package provides support for the EditorConfig standard that
-is an editor-neutral way to provide directory local settings.
+This package provides support for the EditorConfig standard,
+an editor-neutral way to provide directory local (project-wide) settings.
It is enabled via a new global minor mode 'editorconfig-mode'
which makes Emacs obey the '.editorconfig' files.
-And the package also comes with a new major mode 'editorconfig-conf-mode'
+There is also a new major mode 'editorconfig-conf-mode'
to edit those configuration files.
+++
;; Author: EditorConfig Team <editorconfig@googlegroups.com>
;; See
-;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors
-;; or the CONTRIBUTORS file for the list of contributors.
+;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors or
+;; https://github.com/editorconfig/editorconfig-emacs/blob/master/CONTRIBUTORS
+;; for the list of contributors.
;; This file is part of GNU Emacs.
;; Author: EditorConfig Team <editorconfig@googlegroups.com>
;; See
-;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors
-;; or the CONTRIBUTORS file for the list of contributors.
+;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors or
+;; https://github.com/editorconfig/editorconfig-emacs/blob/master/CONTRIBUTORS
+;; for the list of contributors.
;; This file is part of GNU Emacs.
-;;; editorconfig-core.el --- EditorConfig Core library in Emacs Lisp -*- lexical-binding: t -*-
+;;; editorconfig-core.el --- EditorConfig Core library -*- lexical-binding: t -*-
;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
;; Author: EditorConfig Team <editorconfig@googlegroups.com>
;; See
-;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors
-;; or the CONTRIBUTORS file for the list of contributors.
+;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors or
+;; https://github.com/editorconfig/editorconfig-emacs/blob/master/CONTRIBUTORS
+;; for the list of contributors.
;; This file is part of GNU Emacs.
-;;; editorconfig-fnmatch.el --- Glob pattern matching in Emacs lisp -*- lexical-binding: t -*-
+;;; editorconfig-fnmatch.el --- Glob pattern matching -*- lexical-binding: t -*-
;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
;; Author: EditorConfig Team <editorconfig@googlegroups.com>
;; See
-;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors
-;; or the CONTRIBUTORS file for the list of contributors.
+;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors or
+;; https://github.com/editorconfig/editorconfig-emacs/blob/master/CONTRIBUTORS
+;; for the list of contributors.
;; This file is part of GNU Emacs.
;; Author: EditorConfig Team <editorconfig@googlegroups.com>
;; See
-;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors
-;; or the CONTRIBUTORS file for the list of contributors.
+;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors or
+;; https://github.com/editorconfig/editorconfig-emacs/blob/master/CONTRIBUTORS
+;; for the list of contributors.
;; This file is part of GNU Emacs.
;; Keywords: convenience editorconfig
;; See
-;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors
-;; or the CONTRIBUTORS file for the list of contributors.
+;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors or
+;; https://github.com/editorconfig/editorconfig-emacs/blob/master/CONTRIBUTORS
+;; for the list of contributors.
;; This file is part of GNU Emacs.