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

    Update display-warning messages
---
 editorconfig.el | 23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/editorconfig.el b/editorconfig.el
index 29d0f4e6b3..9235eba96a 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -514,9 +514,9 @@ This function also removes 'unset'ted properties and calls
     (condition-case err
         (run-hook-with-args 'editorconfig-hack-properties-functions props)
       (error
-       (display-warning 'editorconfig-hack-properties-functions
-                        (concat (error-message-string err)
-                                ". Abort running hook.")
+       (display-warning '(editorconfig editorconfig-hack-properties-functions)
+                        (format "Error while running 
editorconfig-hack-properties-functions, abort running hook: %S"
+                                err)
                         :warning)))
     props))
 
@@ -549,14 +549,13 @@ Use `editorconfig-mode-apply' instead to make use of 
these variables."
             (condition-case err
                 (run-hook-with-args 'editorconfig-after-apply-functions props)
               (error
-               (display-warning 'editorconfig-after-apply-functions
-                                (concat (error-message-string err)
-                                        ". Stop running hook.")
+               (display-warning '(editorconfig 
editorconfig-after-apply-functions)
+                                (format "Error while running 
editorconfig-after-apply-functions, abort running hook: %S"
+                                        err)
                                 :warning)))))
       (error
-       (display-warning 'editorconfig
-                        (concat (error-message-string err)
-                                ".  Styles will not be applied.")
+       (display-warning '(editorconfig editorconfig-apply)
+                        (format "Error in editorconfig-apply, styles will not 
be applied: %S" err)
                         :error)))))
 
 (defun editorconfig-mode-apply ()
@@ -616,7 +615,7 @@ F is that function, and FILENAME and ARGS are arguments 
passed to F."
                 (editorconfig-merge-coding-systems (gethash 'end_of_line props)
                                                    (gethash 'charset props))))
       (error
-       (display-warning 'editorconfig
+       (display-warning '(editorconfig editorconfig--advice-find-file-noselect)
                         (format "Failed to get properties, styles will not be 
applied: %S"
                                 err)
                         :warning)))
@@ -647,11 +646,11 @@ F is that function, and FILENAME and ARGS are arguments 
passed to F."
             (condition-case err
                 (run-hook-with-args 'editorconfig-after-apply-functions props)
               (error
-               (display-warning 'editorconfig
+               (display-warning '(editorconfig 
editorconfig--advice-find-file-noselect)
                                 (format "Error while running 
`editorconfig-after-apply-functions': %S"
                                         err))))))
       (error
-       (display-warning 'editorconfig
+       (display-warning '(editorconfig editorconfig--advice-find-file-noselect)
                         (format "Error while setting variables from 
EditorConfig: %S" err))))
     ret))
 

Reply via email to