diff options
| author | Stefan Monnier | 2024-06-12 18:27:15 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2024-06-19 14:39:17 -0400 |
| commit | 527a45abc37f1885652b0f29ed5eeabff6db6cda (patch) | |
| tree | c6160f9a8f3855dc2a1867ddb4de85495439caf0 /admin/notes/java | |
| parent | 25523847e7931de1f0ee638d2a8847d979fdb496 (diff) | |
| download | emacs-527a45abc37f1885652b0f29ed5eeabff6db6cda.tar.gz emacs-527a45abc37f1885652b0f29ed5eeabff6db6cda.zip | |
lisp/editorconfig: Don't hook into `read-only-mode-hook`
Don't re-set variables just because `read-only-mode` is (de)activated,
and with Emacs-30's hooks it would be even less natural to do.
Also `buffer-read-only` can change without calling `read-only-mode`,
so better test it dynamically when we try to trim whitespace.
* lisp/editorconfig.el (editorconfig--delete-trailing-whitespace):
New function.
(editorconfig-set-trailing-ws): Use it. Use `pcase`.
Also prefer `before-save-hook` and use `add/remove-hook` to
manipulate hooks, like god intended.
Don't test `buffer-read-only` any more.
(editorconfig-mode): Don't hook into `read-only-mode-hook` any more.
Diffstat (limited to 'admin/notes/java')
0 files changed, 0 insertions, 0 deletions