emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/editorconfig ebc3885 2/3: Fix editorconfig-major-mode-hook


From: ELPA Syncer
Subject: [nongnu] elpa/editorconfig ebc3885 2/3: Fix editorconfig-major-mode-hook (#260)
Date: Thu, 12 Aug 2021 11:57:22 -0400 (EDT)

branch: elpa/editorconfig
commit ebc38859771d6a161ebbaa51f04b2c246aff2661
Author: 10sr <8.slashes@gmail.com>
Commit: GitHub <noreply@github.com>

    Fix editorconfig-major-mode-hook (#260)
---
 editorconfig.el | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/editorconfig.el b/editorconfig.el
index 403a80f..c423086 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -717,7 +717,9 @@ any of regexps in `editorconfig-exclude-regexps'."
   "Function to run when `major-mode' has been changed.
 
 This functions does not reload .editorconfig file, just sets local variables
-again.  Changing major mode can reset these variables."
+again.  Changing major mode can reset these variables.
+
+This function also executes `editorconfig-after-apply-functions' functions."
   (display-warning '(editorconfig editorconfig-major-mode-hook)
                    (format "editorconfig-mode: %S, major-mode: %S, 
-properties-hash: %S"
                            (and (boundp 'editorconfig-mode)
@@ -728,7 +730,13 @@ again.  Changing major mode can reset these variables."
   (when (and (boundp 'editorconfig-mode)
              editorconfig-mode
              editorconfig-properties-hash)
-    (editorconfig-set-local-variables editorconfig-properties-hash)))
+    (editorconfig-set-local-variables editorconfig-properties-hash)
+    (condition-case err
+        (run-hook-with-args 'editorconfig-after-apply-functions 
editorconfig-properties-hash)
+      (error
+       (display-warning '(editorconfig editorconfig-major-mode-hook)
+                        (format "Error while running 
`editorconfig-after-apply-functions': %S"
+                                err))))))
 
 (defvar editorconfig--cons-filename-codingsystem nil
   "Used interally.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]