branch: scratch/editorconfig
commit a3c7e15a972bdd9130a8e79df027063b9f9edb33
Author: Stefan Monnier <monn...@iro.umontreal.ca>
Commit: Stefan Monnier <monn...@iro.umontreal.ca>

    Cosmetic changes for compilation purposes
    
    * editorconfig.el: Remove redundant `:group`: arguments.
    Prefer #' to quote function names.
    
    ert-tests/: Tweak `require` statements to try and avoid recursively
    loading the tests.
---
 editorconfig.el                       | 49 ++++++++++++++---------------------
 ert-tests/editorconfig-core-handle.el |  2 +-
 ert-tests/editorconfig-core.el        |  2 +-
 ert-tests/editorconfig-fnmatch.el     |  2 +-
 ert-tests/editorconfig.el             |  2 +-
 5 files changed, 23 insertions(+), 34 deletions(-)

diff --git a/editorconfig.el b/editorconfig.el
index e7bb3c90b1..d13fe13924 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -73,15 +73,14 @@ coding styles between different editors and IDEs."
   "Path to EditorConfig executable.
 
 Used by `editorconfig--execute-editorconfig-exec'."
-  :type 'string
-  :group 'editorconfig)
+  :type 'string)
 
 (define-obsolete-variable-alias
   'edconf-get-properties-function
   'editorconfig-get-properties-function
   "0.5")
 (defcustom editorconfig-get-properties-function
-  'editorconfig-core-get-properties-hash
+  #'editorconfig-core-get-properties-hash
   "A function which gets EditorConfig properties for specified file.
 
 This function will be called with one argument, full path of the target file,
@@ -107,13 +106,11 @@ Possible known values are:
     use `editorconfig-core-get-properties-hash'
 * `editorconfig-get-properties-from-exec'
   * Get properties by executing EditorConfig executable"
-  :type 'function
-  :group 'editorconfig)
+  :type 'function)
 
 (defcustom editorconfig-mode-lighter " EditorConfig"
   "Command `editorconfig-mode' lighter string."
-  :type 'string
-  :group 'editorconfig)
+  :type 'string)
 
 (define-obsolete-variable-alias
   'edconf-custom-hooks
@@ -143,8 +140,7 @@ show line numbers on the left:
 
 This hook will be run even when there are no matching sections in
 \".editorconfig\", or no \".editorconfig\" file was found at all."
-  :type 'hook
-  :group 'editorconfig)
+  :type 'hook)
 
 (defcustom editorconfig-hack-properties-functions ()
   "A list of function to alter property values before applying them.
@@ -166,8 +162,7 @@ overwrite \"indent_style\" property when current 
`major-mode' is a
 
 This hook will be run even when there are no matching sections in
 \".editorconfig\", or no \".editorconfig\" file was found at all."
-  :type 'hook
-  :group 'editorconfig)
+  :type 'hook)
 (make-obsolete-variable 'editorconfig-hack-properties-functions
                         "Using `editorconfig-after-apply-functions' instead is 
recommended,
     because since 2021/08/30 (v0.9.0) this variable cannot support all 
properties:
@@ -349,21 +344,18 @@ following forms:
 
 NOTE: Only the **buffer local** value of VARIABLE will be set."
   :type '(alist :key-type symbol :value-type sexp)
-  :risky t
-  :group 'editorconfig)
+  :risky t)
 
 (defcustom editorconfig-exclude-modes ()
   "Modes in which `editorconfig-mode-apply' will not run."
-  :type '(repeat (symbol :tag "Major Mode"))
-  :group 'editorconfig)
+  :type '(repeat (symbol :tag "Major Mode")))
 
 (defcustom editorconfig-exclude-regexps ()
   "List of regexp for buffer filenames `editorconfig-mode-apply' will not run.
 
 When variable `buffer-file-name' matches any of the regexps, then
 `editorconfig-mode-apply' will not do its work."
-  :type '(repeat string)
-  :group 'editorconfig)
+  :type '(repeat string))
 (with-eval-after-load 'recentf
   (add-to-list 'editorconfig-exclude-regexps
                (rx-to-string '(seq string-start
@@ -375,8 +367,7 @@ When variable `buffer-file-name' matches any of the 
regexps, then
 
 If set, enable that mode when `trim_trailing_whitespace` is set to true.
 Otherwise, use `delete-trailing-whitespace'."
-  :type 'symbol
-  :group 'editorconfig)
+  :type 'symbol)
 
 (defvar editorconfig-properties-hash nil
   "Hash object of EditorConfig properties that was enabled for current buffer.
@@ -400,13 +391,11 @@ number - `lisp-indent-offset' is not set only if 
indent_size is
 
 (defcustom editorconfig-override-file-local-variables t
   "Non-nil means editorconfig will override file local variable values."
-  :type 'boolean
-  :group 'editorconfig)
+  :type 'boolean)
 
 (defcustom editorconfig-override-dir-local-variables t
   "Non-nil means editorconfig will override values defined in dir-locals.el ."
-  :type 'boolean
-  :group 'editorconfig)
+  :type 'boolean)
 
 (define-error 'editorconfig-error
               "Error thrown from editorconfig lib")
@@ -679,7 +668,7 @@ to non-nil when FINAL-NEWLINE is true."
       (let ((key-val (split-string prop " *= *")))
         (when (> (length key-val) 1)
           (let ((key (intern (car key-val)))
-                (val (mapconcat 'identity (cdr key-val) "")))
+                (val (mapconcat #'identity (cdr key-val) "")))
             (puthash key val properties)))))))
 
 (defun editorconfig-get-properties-from-exec (filename)
@@ -878,16 +867,16 @@ To disable EditorConfig in some buffers, modify
                      rpm-spec-mode-hook)))
     (if editorconfig-mode
         (progn
-          (advice-add 'find-file-noselect :around 
'editorconfig--advice-find-file-noselect)
-          (advice-add 'insert-file-contents :around 
'editorconfig--advice-insert-file-contents)
+          (advice-add 'find-file-noselect :around 
#'editorconfig--advice-find-file-noselect)
+          (advice-add 'insert-file-contents :around 
#'editorconfig--advice-insert-file-contents)
           (dolist (hook modehooks)
             (add-hook hook
-                      'editorconfig-major-mode-hook
+                      #'editorconfig-major-mode-hook
                       t)))
-      (advice-remove 'find-file-noselect 
'editorconfig--advice-find-file-noselect)
-      (advice-remove 'insert-file-contents 
'editorconfig--advice-insert-file-contents)
+      (advice-remove 'find-file-noselect 
#'editorconfig--advice-find-file-noselect)
+      (advice-remove 'insert-file-contents 
#'editorconfig--advice-insert-file-contents)
       (dolist (hook modehooks)
-        (remove-hook hook 'editorconfig-major-mode-hook)))))
+        (remove-hook hook #'editorconfig-major-mode-hook)))))
 
 
 ;; (defconst editorconfig--version
diff --git a/ert-tests/editorconfig-core-handle.el 
b/ert-tests/editorconfig-core-handle.el
index 2c28137394..454a1ab1be 100644
--- a/ert-tests/editorconfig-core-handle.el
+++ b/ert-tests/editorconfig-core-handle.el
@@ -23,7 +23,7 @@
 
 ;;; Code:
 
-(require 'editorconfig-core-handle)
+(require 'editorconfig-core-handle "../editorconfig-core-handle")
 
 (defconst fixtures (concat (file-name-directory load-file-name) "fixtures/")
   "Path to fixtures.")
diff --git a/ert-tests/editorconfig-core.el b/ert-tests/editorconfig-core.el
index 126ee1f514..8d7998b4b3 100644
--- a/ert-tests/editorconfig-core.el
+++ b/ert-tests/editorconfig-core.el
@@ -23,7 +23,7 @@
 
 ;;; Code:
 
-(require 'editorconfig-core)
+(require 'editorconfig-core "../editorconfig-core")
 
 (set-variable 'vc-handled-backends nil)
 
diff --git a/ert-tests/editorconfig-fnmatch.el 
b/ert-tests/editorconfig-fnmatch.el
index 6f2bd71786..c7307003c4 100644
--- a/ert-tests/editorconfig-fnmatch.el
+++ b/ert-tests/editorconfig-fnmatch.el
@@ -23,7 +23,7 @@
 
 ;;; Code:
 
-(require 'editorconfig-fnmatch)
+(require 'editorconfig-fnmatch "../editorconfig-fnmatch")
 
 (set-variable 'vc-handled-backends nil)
 
diff --git a/ert-tests/editorconfig.el b/ert-tests/editorconfig.el
index 4fcfe13f4e..4dae1fa5eb 100644
--- a/ert-tests/editorconfig.el
+++ b/ert-tests/editorconfig.el
@@ -23,7 +23,7 @@
 
 ;;; Code:
 
-(require 'editorconfig)
+(require 'editorconfig "../editorconfig")
 
 (set-variable 'vc-handled-backends nil)
 

Reply via email to