[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] scratch/editorconfig-cc 849229726d 127/351: Massive reformattin
From: |
Stefan Monnier |
Subject: |
[nongnu] scratch/editorconfig-cc 849229726d 127/351: Massive reformatting of docstrings. |
Date: |
Thu, 13 Jun 2024 18:38:46 -0400 (EDT) |
branch: scratch/editorconfig-cc
commit 849229726d7edfffd2ed901dfa6f1c9f458571cb
Author: Hong Xu <hong@topbug.net>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
Massive reformatting of docstrings.
---
editorconfig.el | 64 +++++++++++++++++++++++++++++++++------------------------
1 file changed, 37 insertions(+), 27 deletions(-)
diff --git a/editorconfig.el b/editorconfig.el
index 92477b05c8..3291a9b923 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -48,8 +48,8 @@
(defgroup editorconfig nil
"EditorConfig Emacs Plugin.
-EditorConfig Helps developers define and maintain consistent coding styles
-between different editors and IDEs"
+EditorConfig helps developers define and maintain consistent
+coding styles between different editors and IDEs."
:tag "EditorConfig"
:prefix "editorconfig-"
:group 'tools)
@@ -68,11 +68,12 @@ This executable is invoked by
`editorconfig-call-editorconfig-exec'."
(defcustom editorconfig-get-properties-function
'editorconfig-get-properties
- "Function to get EditorConofig properties for current buffer.
-This function will be called with no argument and should return a hash object
-containing properties, or nil if any core program is not available.
-The hash object should have symbols of property names as keys and strings of
-property values as values."
+ "A function which gets EditorConofig properties for current buffer.
+
+This function will be called with no argument and should return a
+hash object containing properties, or nil if any core program is
+not available. The hash object should have symbols of property
+names as keys and strings of property values as values."
:type 'function
:group 'editorconfig)
(define-obsolete-variable-alias
@@ -83,13 +84,14 @@ property values as values."
(defcustom editorconfig-custom-hooks ()
"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
-obtained through gethash function.
+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
-property emacs_linum to decide whether to show line numbers on the left
+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 property emacs_linum to decide whether to
+show line numbers on the left:
(add-hook 'editorconfig-custom-hooks
'(lambda (props)
@@ -156,8 +158,8 @@ property emacs_linum to decide whether to show line numbers
on the left
Each element looks like (MODE . FUNCTION) or (MODE . INDENT-SPEC-LIST).
-If FUNCTION is provided, it will be called when setting the indentation. The
-indent size will be passed.
+If FUNCTION is provided, it will be called when setting the
+indentation. The indent size will be passed.
If INDENT-SPEC-LIST is provided, each element of it must have one of the
following forms:
@@ -199,14 +201,15 @@ NOTE: Only the **buffer local** value of VARIABLE will be
set."
(defcustom editorconfig-exclude-regexps
(list (eval-when-compile
(rx string-start (or "http" "https" "ftp" "sftp" "rsync") ":")))
- "List of buffer filename prefix regexp patterns not to apply properties."
+ "List of buffer filename prefix regexp patterns not to apply
+properties."
:type '(repeat string)
:group 'editorconfig)
(defvar editorconfig-properties-hash nil
"Hash object of EditorConfig properties for current buffer.
-Set by `editorconfig-apply' and nil if that is not invoked in current buffer
-yet.")
+Set by `editorconfig-apply' and nil if that is not invoked in
+current buffer yet.")
(make-variable-buffer-local 'editorconfig-properties-hash)
@@ -253,7 +256,7 @@ yet.")
(defun editorconfig-set-line-length (length)
- "Set the max line length (fill-column) to LENGTH."
+ "Set the max line length (`fill-column') to LENGTH."
(when (and (editorconfig-string-integer-p length)
(> (string-to-number length) 0))
(set-fill-column (string-to-number length))))
@@ -265,7 +268,8 @@ yet.")
)
(defun editorconfig-get-properties-from-exec ()
- "Get EditorConfig properties of current buffer by calling
`editorconfig-exec-path'."
+ "Get EditorConfig properties of current buffer by calling
+`editorconfig-exec-path'."
(if (executable-find editorconfig-exec-path)
(editorconfig-parse-properties (editorconfig-call-editorconfig-exec))
(error "Unable to find editorconfig executable")))
@@ -302,8 +306,8 @@ It calls `editorconfig-get-properties-from-exec' if
;;;###autoload
(defun editorconfig-apply ()
"Apply EditorConfig properties for current buffer.
-This function ignores `editorconfig-exclude-modes' and always applies available
-properties."
+This function ignores `editorconfig-exclude-modes' and always
+applies available properties."
(interactive)
(when buffer-file-name
(condition-case err
@@ -326,8 +330,8 @@ properties."
(defun editorconfig-mode-apply ()
"Apply EditorConfig properties for current buffer.
-This function do the job only when the major mode is not listed in
-`editorconfig-exclude-modes'."
+This function does the job only when the major mode is not listed
+in `editorconfig-exclude-modes'."
(when (and major-mode
(not (memq major-mode
editorconfig-exclude-modes))
@@ -341,9 +345,9 @@ This function do the job only when the major mode is not
listed in
;;;###autoload
(define-minor-mode editorconfig-mode
"Toggle EditorConfig feature.
-When enabled EditorConfig properties will be applied to buffers when first
-visiting files or changing major modes if the major mode is not listed in
-`editorconfig-exclude-modes'."
+When enabled EditorConfig properties will be applied to buffers
+when first visiting files or changing major modes if the major
+mode is not listed in `editorconfig-exclude-modes'."
:global t
:lighter " EditorConfig"
(dolist (hook '(after-change-major-mode-hook))
@@ -352,3 +356,9 @@ visiting files or changing major modes if the major mode is
not listed in
(remove-hook hook 'editorconfig-mode-apply))))
(provide 'editorconfig)
+
+;;; editorconfig.el ends here
+
+;; Local Variables:
+;; sentence-end-double-space: t
+;; End:
- [nongnu] scratch/editorconfig-cc 6cf680e9c7 112/351: Print line number and its content on parse error (#95), (continued)
- [nongnu] scratch/editorconfig-cc 6cf680e9c7 112/351: Print line number and its content on parse error (#95), Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 05f63eca50 136/351: Update year in copyright, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 58e2e82ce3 151/351: Add apache-mode support (#135), Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc a38a4f2111 160/351: Add tests for lisp-indent-offset ignore, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 4615e1b66b 108/351: Bump version to 0.7.6, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 25edbde066 142/351: Add support for feature mode. (#128), Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc d6632cb80b 111/351: Add a note about deprecating marmalade repository, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 34ad61d6f8 119/351: Bump version to 0.7.7, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 907a4afa7a 143/351: Set `fill-column` directly, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 302afbb3e3 150/351: Add file_type_emacs to editorocnfig-conf-mode keywords, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 849229726d 127/351: Massive reformatting of docstrings.,
Stefan Monnier <=
- [nongnu] scratch/editorconfig-cc 53507a8f23 158/351: Add csharp-mode support (#154), Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 490381ede2 154/351: Prepare v0.7.11, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 17ba04ab68 141/351: Update editorconfig-conf-mode lighter text, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc b33e5568ff 172/351: Add test for various normal whitespace, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 270193df31 175/351: Fix batch command for emacs26-pretest testing, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 706348108c 181/351: Check editorconfig configs when read only state changes, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 96129d1007 190/351: Update doc, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 988220a65b 189/351: Update header.txt, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 3a7bb0d820 185/351: Clear translate cache on file reload, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 33ab2b6485 195/351: Add ert-test for file_type_ext, Stefan Monnier, 2024/06/13