[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/emacs-editorconfig 33b0716c668 082/364: Add editorocnfig-display
From: |
Stefan Monnier |
Subject: |
scratch/emacs-editorconfig 33b0716c668 082/364: Add editorocnfig-display-current-properties |
Date: |
Tue, 18 Jun 2024 01:40:40 -0400 (EDT) |
branch: scratch/emacs-editorconfig
commit 33b0716c668685e177ffbe28efb7a95011b405b1
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 3a541f19840..b8ebdb8aaa4 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -199,6 +199,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)
- scratch/emacs-editorconfig b9c1318088e 100/364: Update editorconfig group docstring, (continued)
- scratch/emacs-editorconfig b9c1318088e 100/364: Update editorconfig group docstring, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 335e70e23df 107/364: Trivial commentary fix, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 70e85e6153f 115/364: Load editorconfig-core explicitly just becore use (#100), Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 02ab02413f0 094/364: Add Customize section to README, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 78788959181 099/364: Make indentation of sample codes more consistent, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig adb9ba4a9d7 064/364: Update README for charset support, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 953f4f0ab77 074/364: Bump version: 0.7.1, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig a7ea6807e5a 071/364: Add ess-mode indentation support, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig f34c82709e2 077/364: Add support for scss-mode, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 50df3046e5a 081/364: Add one variable editorconfig-properties-hash, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 33b0716c668 082/364: Add editorocnfig-display-current-properties,
Stefan Monnier <=
- scratch/emacs-editorconfig 998d0e8f766 086/364: Bump version to 0.7.4, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig f2629b0abb5 087/364: Do not check metadata of files other than editorconfig.el, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig e68384d544c 088/364: Refactor editorconfig-conf-mode, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig cdcc5826d68 089/364: Add make sandbox target, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 7505fb780ff 108/364: Bump version to 0.7.6, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 331edef26d0 109/364: Remove link to Marmalade package repository, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 1c328163516 119/364: Bump version to 0.7.7, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig d79b9e410aa 104/364: Use truename for editorconfig name, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig d900f27638d 113/364: Simplify definition of string-integer-p (#96), Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig d94e1f29f33 052/364: Fix some warnings reported by flycheck, Stefan Monnier, 2024/06/18