emacs-diffs
[Top][All Lists]
Advanced

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

scratch/emacs-editorconfig 812831ee2f7 06/21: * lisp/editorconfing.el: C


From: Stefan Monnier
Subject: scratch/emacs-editorconfig 812831ee2f7 06/21: * lisp/editorconfing.el: Cosmetic ELisp style changes
Date: Wed, 19 Jun 2024 14:43:53 -0400 (EDT)

branch: scratch/emacs-editorconfig
commit 812831ee2f754277050bc15053490119d13ef958
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * lisp/editorconfing.el: Cosmetic ELisp style changes
    
    Prefer #' to quote function names.
    Remove redundant :groups.
    Silence compiler warnings.
    
    * lisp/editorconfig.el: Remove post-trailer.
    The var is already set via `.dir-locals.el` anyway.
    (editorconfig-call-get-properties-function): Use 
condition-case-unless-debug.
---
 lisp/editorconfig-core.el    |  2 +-
 lisp/editorconfig-fnmatch.el |  2 +-
 lisp/editorconfig-tools.el   |  2 +-
 lisp/editorconfig.el         | 15 ++++-----------
 4 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/lisp/editorconfig-core.el b/lisp/editorconfig-core.el
index 2f9b374e0ed..bdd5f49aa6e 100644
--- a/lisp/editorconfig-core.el
+++ b/lisp/editorconfig-core.el
@@ -85,7 +85,7 @@ RESULT is used internally and normally should not be used."
         (parent (file-name-directory (directory-file-name dir))))
     (if (or (string= parent dir)
             (and handle (editorconfig-core-handle-root-p handle)))
-        (cl-remove-if-not 'identity (cons handle result))
+        (cl-remove-if-not #'identity (cons handle result))
       (editorconfig-core--get-handles parent
                                       confname
                                       (cons handle result)))))
diff --git a/lisp/editorconfig-fnmatch.el b/lisp/editorconfig-fnmatch.el
index 85eab7abc35..4f6feb0f893 100644
--- a/lisp/editorconfig-fnmatch.el
+++ b/lisp/editorconfig-fnmatch.el
@@ -234,7 +234,7 @@ translation is found for PATTERN."
                            (number-end (string-to-number (match-string 2
                                                                        
pattern-sub))))
                        (setq result `(,@result ,(concat "\\(?:"
-                                                        (mapconcat 
'number-to-string
+                                                        (mapconcat 
#'number-to-string
                                                                    (cl-loop 
for i from number-start to number-end
                                                                             
collect i)
                                                                    "\\|")
diff --git a/lisp/editorconfig-tools.el b/lisp/editorconfig-tools.el
index 7364a7135c3..ebc6a45d7bd 100644
--- a/lisp/editorconfig-tools.el
+++ b/lisp/editorconfig-tools.el
@@ -112,7 +112,7 @@ any of regexps in `editorconfig-exclude-regexps'."
     nil))
 ;;;###autoload
 (defalias 'describe-editorconfig-properties
-  'editorconfig-display-current-properties)
+  #'editorconfig-display-current-properties)
 
 
 (provide 'editorconfig-tools)
diff --git a/lisp/editorconfig.el b/lisp/editorconfig.el
index cba4eea319c..df707a6644a 100644
--- a/lisp/editorconfig.el
+++ b/lisp/editorconfig.el
@@ -92,8 +92,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.
@@ -115,8 +114,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:
@@ -196,8 +194,7 @@ This hook will be run even when there are no matching 
sections in
 
 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.
@@ -378,7 +375,7 @@ This function also removes `unset' properties and calls
       (setq filename (expand-file-name filename))
     (editorconfig-error "Invalid argument: %S" filename))
   (let ((props nil))
-    (condition-case err
+    (condition-case-unless-debug err
         (setq props (editorconfig-core-get-properties-hash filename))
       (error
        (editorconfig-error "Error from editorconfig-core-get-properties-hash: 
%S"
@@ -585,7 +582,3 @@ version in the echo area and the messages buffer."
 
 (provide 'editorconfig)
 ;;; editorconfig.el ends here
-
-;; Local Variables:
-;; sentence-end-double-space: t
-;; End:



reply via email to

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