[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] scratch/editorconfig-cc c02d94298b 082/351: Add editorocnfig-di
From: |
Stefan Monnier |
Subject: |
[nongnu] scratch/editorconfig-cc c02d94298b 082/351: Add editorocnfig-display-current-properties |
Date: |
Thu, 13 Jun 2024 18:38:43 -0400 (EDT) |
branch: scratch/editorconfig-cc
commit c02d94298babd6e5a01db4a3b80c1f3c791eff38
Author: 10sr <8slashes+git@gmail.com>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
Add editorocnfig-display-current-properties
A function useful for debugging.
---
editorconfig.el | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/editorconfig.el b/editorconfig.el
index 3ea489d7a2..e1de827889 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -256,6 +256,25 @@ It calls `editorconfig-get-properties-from-exec' if
(editorconfig-get-propergies-from-exec)
(editorconfig-core-get-properties-hash)))
+(defun editorconfig-display-current-properties ()
+ "Display EditorConfig properties extracted for current buffer."
+ (interactive)
+ (if editorconfig-properties-hash
+ (let (
+ (buf (get-buffer-create "*EditorConfig Properties*"))
+ (file buffer-file-name)
+ (props editorconfig-properties-hash))
+ (with-current-buffer buf
+ (erase-buffer)
+ (insert (format "# EditorConfig for %s\n" file))
+ (maphash (lambda (k v)
+ (insert (format "%S = %s\n" k v)))
+ props))
+ (display-buffer buf))
+ (message "Properties are not applied to current buffer yet.")
+ nil))
+
+;;;###autoload
(defun editorconfig-apply ()
"Apply EditorConfig properties for current buffer."
(interactive)
- [nongnu] scratch/editorconfig-cc ee5b70f1e2 068/351: editorocnfig-core: Throw error when parsing .editorconfig failed, (continued)
- [nongnu] scratch/editorconfig-cc ee5b70f1e2 068/351: editorocnfig-core: Throw error when parsing .editorconfig failed, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 3bdd68d5af 069/351: Add tcl-mode indentation support, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 32fb0d6b9c 056/351: Use `require` instead of `load` in usage example, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 903e483a70 052/351: Make `editorconfig-apply' an interactive command, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 4fd932bb7c 060/351: Check package metadata using ert framework, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 56722d34df 019/351: Add sh-indentation to the list of indent variable., Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 92519a8c25 022/351: Don't set indent size if the given value makes no sense., Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 242cc0ccea 045/351: Use core in elisp as a fallback, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc b1643c7360 077/351: Add support for scss-mode, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc e7a0874591 026/351: Add hook mechanism., Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc c02d94298b 082/351: Add editorocnfig-display-current-properties,
Stefan Monnier <=
- [nongnu] scratch/editorconfig-cc e452e1d45b 086/351: Bump version to 0.7.4, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 1eabf1ce45 110/351: Add link to Melpa stable, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 0057f62085 103/351: Bump version to 0.7.5, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc c9b5e73d1d 138/351: Add support for verilog-mode, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc aa57926fdf 163/351: docs -> doc, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc f2c8300dba 129/351: Add Usami Kenta to the contributor list., Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc d7c6a8befd 128/351: Reidentation for all *.el files., Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 8a2e9be119 131/351: Fix indentations of ert-tests/, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 20c8ea8cc9 174/351: Update travis config file, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc b5f1eab15e 169/351: Update texi, Stefan Monnier, 2024/06/13