[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:
- branch scratch/emacs-editorconfig created (now a72b1ca231c), Stefan Monnier, 2024/06/19
- scratch/emacs-editorconfig f563f0f9610 01/21: Squashed commit of the following:, Stefan Monnier, 2024/06/19
- scratch/emacs-editorconfig 729fc9b88b4 02/21: Fix up copyright lines and license blurbs, Stefan Monnier, 2024/06/19
- scratch/emacs-editorconfig ffe2524bfaf 13/21: editorconfig.el: Miscellaneous minor changes, Stefan Monnier, 2024/06/19
- scratch/emacs-editorconfig 8cfa6fe8012 04/21: Remove support for `editorconfig-override-*-local-variables`, Stefan Monnier, 2024/06/19
- scratch/emacs-editorconfig 3f90253dae0 03/21: Remove support for the `editorconfig` executable, Stefan Monnier, 2024/06/19
- scratch/emacs-editorconfig c5d86db8117 05/21: Remove support for `editorconfig-exclude-*`, Stefan Monnier, 2024/06/19
- scratch/emacs-editorconfig 812831ee2f7 06/21: * lisp/editorconfing.el: Cosmetic ELisp style changes,
Stefan Monnier <=
- scratch/emacs-editorconfig 3da6765c990 07/21: * lisp/editorconfig.el (editorconfig-mode): Remove `:lighter`, Stefan Monnier, 2024/06/19
- scratch/emacs-editorconfig 25523847e79 08/21: (editorconfig--should-set): Eliminate `lisp-indent-offset` special case, Stefan Monnier, 2024/06/19
- scratch/emacs-editorconfig a20f20aa8c7 12/21: lisp/editorconfig: Advise `find-auto-coding` i.s.o `insert-file-contents`, Stefan Monnier, 2024/06/19
- scratch/emacs-editorconfig 7a4208a54c0 17/21: editorconfig-fnmatch.el: Eliminate O(N^2) complexity, Stefan Monnier, 2024/06/19
- scratch/emacs-editorconfig 35744aae563 18/21: editorconfig-core-handle.el: Reduce allocation in parser, Stefan Monnier, 2024/06/19
- scratch/emacs-editorconfig 91339a9f1fa 20/21: (editorconfig-indentation-alist): Sync with upstream, Stefan Monnier, 2024/06/19
- scratch/emacs-editorconfig f2803456f02 10/21: (editorconfig-set-local-variables): Get first, set later, Stefan Monnier, 2024/06/19
- scratch/emacs-editorconfig c1466f16b10 15/21: editorconfig-core-handle.el: Don't use file names as glob pattern, Stefan Monnier, 2024/06/19
- scratch/emacs-editorconfig a72b1ca231c 21/21: Integrate feedback from Stefan Kangas and Michael Albinus, Stefan Monnier, 2024/06/19
- scratch/emacs-editorconfig 527a45abc37 09/21: lisp/editorconfig: Don't hook into `read-only-mode-hook`, Stefan Monnier, 2024/06/19