(editorconfig-set-local-variables): Get first, set later
In preparation for the use of Emacs-30's
`hack-dir-local-get-variables-functions`, split the job of
`editorconfig-set-local-variables` into getting an alist of settings
and then applying them.
Rename the `editorconfig-set-*` functions to `editorconfig--get-*`
and make them return an alist of settings rather than applying them
(except for `editorconfig-set-coding-system-revert` which arguably
belongs in `editorconfig-tools.el` anyway).
* lisp/editorconfig.el (editorconfig-indentation-alist): Flesh out the doc.
Use the new `editorconfig--get-indentation-*-mode` functions.
(editorconfig--get-indentation-web-mode): New function extracted from
`editorconfig-indentation-alist`.
(editorconfig--get-indentation-*-mode): Don't `boundp`-test the vars.
(editorconfig--default-indent-size-function): New function.
Test `boundp` here.
(editorconfig-indent-size-vars): New var.
(editorconfig--get-indentation, editorconfig--get-trailing-nl): Rewrite.
(editorconfig--add-hook-safe-p): New function.
Add it to the `safe-local-eval-function` property of `add-hook`.
(editorconfig-get-local-variables-functions): New hook.
(editorconfig--get-local-variables): Rewrite using it.
(editorconfig-set-local-variables): Test `editorconfig--should-set` here.
Rewrite it using `editorconfig--get-local-variables`.
(cherry picked from commit
f2803456f029f24276901c2b3115965d892a99d0)