[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] scratch/editorconfig-cc a6ab681950 038/351: Apply settings on m
From: |
Stefan Monnier |
Subject: |
[nongnu] scratch/editorconfig-cc a6ab681950 038/351: Apply settings on major mode change |
Date: |
Thu, 13 Jun 2024 18:38:39 -0400 (EDT) |
branch: scratch/editorconfig-cc
commit a6ab681950f97211f201ca96315fee7f7375adfc
Author: Hong Xu <hong@topbug.net>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
Apply settings on major mode change
---
editorconfig.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/editorconfig.el b/editorconfig.el
index 3b9d408352..64909c0052 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -216,11 +216,12 @@ NOTE: Only the **buffer local** value of VARIABLE will be
set."
"Toggle EditorConfig feature."
:global t
:lighter ""
- (if editorconfig-mode
- (add-hook 'find-file-hook
- 'editorconfig-apply)
- (remove-hook 'find-file-hook
- 'editorconfig-apply)))
+ (dolist (hook (list
+ 'find-file-hook
+ 'after-change-major-mode-hook))
+ (if editorconfig-mode
+ (add-hook hook 'editorconfig-apply)
+ (remove-hook hook 'editorconfig-apply))))
;;;###autoload
(add-to-list 'auto-mode-alist '("/\\.editorconfig\\'" . conf-unix-mode))
- [nongnu] scratch/editorconfig-cc 96129d1007 190/351: Update doc, (continued)
- [nongnu] scratch/editorconfig-cc 96129d1007 190/351: Update doc, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 988220a65b 189/351: Update header.txt, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 3a7bb0d820 185/351: Clear translate cache on file reload, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 33ab2b6485 195/351: Add ert-test for file_type_ext, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 625073f793 224/351: Implement --hash-merge, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc baa846c702 226/351: Remove unused tests, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc d2963a3313 227/351: Use 0.8.0 for next version, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc e0d8fdbdbb 248/351: Use https for melpa badge, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 52abce4b1e 268/351: 2020, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc d7a7b6af8e 013/351: Add JS and HTML indent settings., Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc a6ab681950 038/351: Apply settings on major mode change,
Stefan Monnier <=
- [nongnu] scratch/editorconfig-cc 17f14d982a 071/351: Add ess-mode indentation support, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 8b5d83be82 074/351: Bump version: 0.7.1, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 4c583b154b 067/351: Remove find-file-hook, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 98838dbc62 061/351: Fix names of ert test cases, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 144858388f 085/351: Fix dependencies for one multifile package, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 1971ac1dce 088/351: Refactor editorconfig-conf-mode, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc c09aa6e58a 094/351: Add Customize section to README, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc d78fd7acd5 091/351: Create a syntax table for editorconfig-conf-mode., Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 312f92419c 092/351: No need to explicitly highlight the comments via font-lock in editorconfig-conf-mode, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc f263d8a45c 095/351: Update instructions about core program, Stefan Monnier, 2024/06/13