[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/emacs-editorconfig d94e1f29f33 052/364: Fix some warnings report
From: |
Stefan Monnier |
Subject: |
scratch/emacs-editorconfig d94e1f29f33 052/364: Fix some warnings reported by flycheck |
Date: |
Tue, 18 Jun 2024 01:40:36 -0400 (EDT) |
branch: scratch/emacs-editorconfig
commit d94e1f29f333bc8e70fda372a0ca906d54eed365
Author: 10sr <8slashes+git@gmail.com>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
Fix some warnings reported by flycheck
Mainly docstring fix
---
editorconfig.el | 39 +++++++++++++++++++++++++--------------
1 file changed, 25 insertions(+), 14 deletions(-)
diff --git a/editorconfig.el b/editorconfig.el
index 96183dd3227..b6a067b9811 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -45,7 +45,9 @@
(defcustom editorconfig-exec-path
"editorconfig"
- "EditorConfig command"
+ "EditorConfig executable name.
+
+This executable is invoked by `editorconfig-call-editorconfig-exec'."
:type 'string
:group 'editorconfig)
(define-obsolete-variable-alias
@@ -68,23 +70,21 @@ property values as values."
"0.5")
(defcustom editorconfig-custom-hooks ()
- "A list of custom hooks after loading common EditorConfig settings
+ "A list of custom hooks 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 of properties can be
+Each element in this list is a hook function. This hook function takes one
+parameter, which is a property hash table. The value of properties can be
obtained through gethash function.
The hook does not have to be coding style related; you can add whatever
-functionality you want. For example, the following is an example to add a new
+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-to-list 'editorconfig-custom-hooks
- '(lambda (props)
- (let ((show-line-num (gethash 'emacs_linum props)))
- (cond ((equal show-line-num \"true\") (linum-mode 1))
- ((equal show-line-num \"false\") (linum-mode 0))))))
-
-"
+ (add-to-list 'editorconfig-custom-hooks
+ '(lambda (props)
+ (let ((show-line-num (gethash 'emacs_linum props)))
+ (cond ((equal show-line-num \"true\") (linum-mode 1))
+ ((equal show-line-num \"false\") (linum-mode 0))))))"
:type '(lambda (properties) (body))
:group 'editorconfig)
(define-obsolete-variable-alias
@@ -116,22 +116,32 @@ property emacs_linum to decide whether to show line
numbers on the left
"0.5")
(defun editorconfig-string-integer-p (string)
- "Whether a string representing integer"
+ "Return non-nil if STRING represents integer."
(if (stringp string)
(string-match-p "\\`[0-9]+\\'" string)
nil))
+(defun editorconfig-set-indentation/python-mode (size)
+ "Set `python-mode' indent size to SIZE."
+ )
+
+(defun editorconfig-set-indentation/latex-mode (size)
+ "Set `latex-mode' indent size to SIZE."
+ )
+
(defun editorconfig-set-indentation (style &optional size tab_width)
+ "Set indentation type from STYLE, SIZE and TAB_WIDTH."
(if (editorconfig-string-integer-p size)
(setq size (string-to-number size))
(when (not (equal size "tab")) (setq size nil)))
)
(defun editorconfig-set-line-ending (end-of-line)
+ "Set line ending style to CR, LF, or CRLF by END-OF-LINE."
)
(defun editorconfig-set-line-length (length)
- "set the max line length (fill-column)"
+ "Set the max line length (fill-column) to LENGTH."
(when (editorconfig-string-integer-p length)
(set-fill-column (string-to-number length))))
@@ -160,6 +170,7 @@ It calls `editorconfig-get-properties-from-exec' if
(editorconfig-core-get-properties-hash)))
(defun editorconfig-apply ()
+ "Apply EditorConfig properties for current buffer."
(when buffer-file-name
(let ((props (and (functionp editorconfig-get-properties-function)
(funcall editorconfig-get-properties-function))))
- scratch/emacs-editorconfig 33b0716c668 082/364: Add editorocnfig-display-current-properties, (continued)
- scratch/emacs-editorconfig 33b0716c668 082/364: Add editorocnfig-display-current-properties, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 998d0e8f766 086/364: Bump version to 0.7.4, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig f2629b0abb5 087/364: Do not check metadata of files other than editorconfig.el, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig e68384d544c 088/364: Refactor editorconfig-conf-mode, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig cdcc5826d68 089/364: Add make sandbox target, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 7505fb780ff 108/364: Bump version to 0.7.6, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 331edef26d0 109/364: Remove link to Marmalade package repository, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 1c328163516 119/364: Bump version to 0.7.7, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig d79b9e410aa 104/364: Use truename for editorconfig name, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig d900f27638d 113/364: Simplify definition of string-integer-p (#96), Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig d94e1f29f33 052/364: Fix some warnings reported by flycheck,
Stefan Monnier <=
- scratch/emacs-editorconfig 98a370e8896 127/364: Massive reformatting of docstrings., Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 58f10645403 057/364: Add MELPA badges, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig fe9ed9b4cbf 061/364: Fix names of ert test cases, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 5b9a1a38d2b 070/364: Add ps-mode indentation support, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig d150069fc61 073/364: Catch error thrown from get-properties-function and display it, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig f907c968c88 075/364: Already 2016 :) Happy new year!, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 37d22c07507 076/364: Bump version to 0.7.2, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 0791fced087 083/364: Add editorconfig-exclude-modes, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig 3d6df2ae193 090/364: Derive editorconfig-conf-mode from conf-unix-mode, Stefan Monnier, 2024/06/18
- scratch/emacs-editorconfig b93a7964d43 096/364: Add a comment for contributors, Stefan Monnier, 2024/06/18