aboutsummaryrefslogtreecommitdiffstats
path: root/exec/exec.c
diff options
context:
space:
mode:
authorStefan Monnier2024-06-12 18:27:15 -0400
committerStefan Monnier2024-06-19 14:39:17 -0400
commit527a45abc37f1885652b0f29ed5eeabff6db6cda (patch)
treec6160f9a8f3855dc2a1867ddb4de85495439caf0 /exec/exec.c
parent25523847e7931de1f0ee638d2a8847d979fdb496 (diff)
downloademacs-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 'exec/exec.c')
0 files changed, 0 insertions, 0 deletions