branch: scratch/editorconfig-cc
commit 031ef9c1c119b7e8157b3f47af2d922f43564f9a
Author: 10sr <8slashes+...@gmail.com>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

    Add one variable editorconfig-properties-hash
---
 editorconfig.el | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/editorconfig.el b/editorconfig.el
index 7d9ea968cd..3ea489d7a2 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -181,6 +181,13 @@ NOTE: Only the **buffer local** value of VARIABLE will be 
set."
   'editorconfig-indentation-alist
   "0.5")
 
+(defvar editorconfig-properties-hash nil
+  "Hash object of EditorConfig properties for current buffer.
+Set by `editorconfig-apply' and nil if that is not invoked in current buffer
+yet.")
+(make-variable-buffer-local 'editorconfig-properties-hash)
+
+
 (defun editorconfig-string-integer-p (string)
   "Return non-nil if STRING represents integer."
   (if (stringp string)
@@ -259,6 +266,7 @@ It calls `editorconfig-get-properties-from-exec' if
           (error "Invalid editorconfig-get-properties-function value"))
         (let ((props (funcall editorconfig-get-properties-function)))
           (progn
+            (setq editorconfig-properties-hash props)
             (editorconfig-set-coding-system
               (gethash 'end_of_line props)
               (gethash 'charset props))

Reply via email to