[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] scratch/editorconfig-cc 60b39fadfb 209/351: Add variable -hack-
From: |
Stefan Monnier |
Subject: |
[nongnu] scratch/editorconfig-cc 60b39fadfb 209/351: Add variable -hack-properties-functions |
Date: |
Thu, 13 Jun 2024 18:38:54 -0400 (EDT) |
branch: scratch/editorconfig-cc
commit 60b39fadfbf879c56b002d76e37d025ba8f93d98
Author: 10sr <8.slashes@gmail.com>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
Add variable -hack-properties-functions
---
editorconfig.el | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/editorconfig.el b/editorconfig.el
index bfd74671ad..6dd4ae0068 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -114,6 +114,24 @@ show line numbers on the left:
'editorconfig-after-apply-functions
"0.7.14")
+(defcustom editorconfig-hack-properties-functions ()
+ "A list of function to alter property values before applying them.
+
+These functions will be run after loading \".editorconfig\" files and before
+applying them to current buffer, so that you can alter some properties from
+\".editorconfig\" before they take effect.
+
+For example, Makefiles always use tab characters for indentation: you can
+overwrite \"indent_style\" property when current `major-mode' is a
+`makefile-mode' with following code:
+
+ (add-hook 'editorconfig-hack-properties-functions
+ '(lambda (props)
+ (when (derived-mode-p makefile-mode)
+ (puthash 'indent_style \"tab\" props))))"
+ :type 'hook
+ :group 'editorconfig)
+
(defcustom editorconfig-indentation-alist
;; For contributors: Sort modes in alphabetical order, please :)
'((apache-mode apache-indent-level)
- [nongnu] scratch/editorconfig-cc c71e282e4c 184/351: Remove numeric-range related vairables, (continued)
- [nongnu] scratch/editorconfig-cc c71e282e4c 184/351: Remove numeric-range related vairables, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc c7975d6954 192/351: Update texi for HTTPS url, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc ad79062996 179/351: Use emacs 26.1 instead of 26-pretest (#166), Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 6f769c93b1 183/351: Stop checking numeric range separately, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc e0bf950716 194/351: Add ert-test for file_type_emacs (#177), Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 6ff678a856 200/351: Make conf-mode used when a file has .editorconfig extension, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 82af619ed5 206/351: Use derived-mode-p for major-mode check (#180), Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc df95ca5e4f 203/351: Do not call mode func when current mode is a child mode of target (#179), Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 0072bcc14f 207/351: Update texi for hook name change, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc a365955dca 202/351: Use file_type_ext for test fixtures, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 60b39fadfb 209/351: Add variable -hack-properties-functions,
Stefan Monnier <=
- [nongnu] scratch/editorconfig-cc f1b83aacd2 214/351: Fix hack-properties-functions example, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 10467ed9df 221/351: Use Markdown's code spans instead of Emacs style `' (#186), Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 658bfb9bd8 213/351: Fix README and texi, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc e24803269d 212/351: Update document, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 6929cad23b 223/351: Update get-properties-hash, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc cdbd60a8a6 234/351: M-x checkdoc, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 0bbf63616a 231/351: Stop using cl-defclass, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 9cee9bb143 225/351: Get alist result from hash result, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 516ebfefa3 232/351: Remove useless spaces, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 50ed9cf1a7 235/351: Update year, Stefan Monnier, 2024/06/13