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

    Change hook name -custom-hooks -> -after-apply-functions
    
    With obsolete-variable-alias
---
 editorconfig.el | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/editorconfig.el b/editorconfig.el
index b8bc2c09bb..17359095c9 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -86,8 +86,8 @@ names as keys and strings of property values as values."
   'editorconfig-get-properties-function
   "0.5")
 
-(defcustom editorconfig-custom-hooks ()
-  "A list of custom hooks after loading common EditorConfig settings.
+(defcustom editorconfig-after-apply-functions ()
+  "A list of functions after loading common EditorConfig settings.
 
 Each element in this list is a hook function.  This hook function
 takes one parameter, which is a property hash table.  The value
@@ -98,7 +98,7 @@ whatever functionality you want.  For example, the following 
is
 an example to add a new property emacs_linum to decide whether to
 show line numbers on the left:
 
-  (add-hook 'editorconfig-custom-hooks
+  (add-hook 'editorconfig-after-apply-functions
     '(lambda (props)
        (let ((show-line-num (gethash 'emacs_linum props)))
          (cond ((equal show-line-num \"true\") (linum-mode 1))
@@ -107,8 +107,12 @@ show line numbers on the left:
   :group 'editorconfig)
 (define-obsolete-variable-alias
   'edconf-custom-hooks
-  'editorconfig-custom-hooks
+  'editorconfig-after-apply-functions
   "0.5")
+(define-obsolete-variable-alias
+  'editorconfig-custom-hooks
+  'editorconfig-after-apply-functions
+  "0.7.13")
 
 (defcustom editorconfig-indentation-alist
   ;; For contributors: Sort modes in alphabetical order, please :)
@@ -466,9 +470,9 @@ applies available properties."
               (editorconfig-set-major-mode-from-name (gethash 'file_type_emacs 
props))
               (editorconfig-set-major-mode-from-ext (gethash 'file_type_ext 
props))
               (condition-case err
-                  (run-hook-with-args 'editorconfig-custom-hooks props)
+                  (run-hook-with-args 'editorconfig-after-apply-functions 
props)
                 (error
-                 (display-warning 'editorconfig-custom-hooks
+                 (display-warning 'editorconfig-after-apply-functions
                                   (concat (error-message-string err)
                                           ". Stop running hook.")
                                   :warning))))))

Reply via email to