Skip to content

Relevance of custom vars #343

@monnier

Description

@monnier

[ This is coming up in the context of integrating the code into Emacs. ]

I wonder how important are the various Custom variables, in order to decide how/if we should support them in the code for Emacs≥30:

  • editorconfig-get-properties-function: I wonder if it's still relevant now that editorconfig-core-get-properties-hash works well. Is support for the editorconfig executable still necessary/useful sometimes? The new hook actually would like to know where the settings come from (and if there are several relevant .editorconfig files, we'd ideally want to return the settings grouped according to (and annotated with) which file they come from).

  • editorconfig-after-apply-functions: With Emacs-30's new hook, the editorconfig code is not supposed to apply the settings but only to return them (they're later applied by Emacs's file/dir-local variables code). So, we'd need to change this to return a list of (VAR . VAL). But it depends on how much this hook is used and for what (e.g. the example in the docstring of activating linum is inconvenient to turn into a (VAR . VAL), but also linum is pretty much obsolete, and whether or not to use linum in a file seems like an abuse of .editorconfig anyway).

  • editorconfig-exclude-modes: Is this ever used? If so, for what?

  • editorconfig-exclude-regexps: Same questions. Here at least, the commit history does mention some uses:

  • editorconfig-override-file-local-variables: We can't really obey this setting if we use the new hook (unless the value is nil 🙂).

  • editorconfig-override-dir-local-variables: It would take an ugly hack to obey this setting when we use the new hook. The new hook's behavior wants to use the proximity of the .editorconfig file compared to that of the .dir-locals.el file to decide which setting takes precedence.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions