[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
scratch/emacs-editorconfig 98a370e8896 127/364: Massive reformatting of
From: |
Stefan Monnier |
Subject: |
scratch/emacs-editorconfig 98a370e8896 127/364: Massive reformatting of docstrings. |
Date: |
Tue, 18 Jun 2024 01:40:46 -0400 (EDT) |
branch: scratch/emacs-editorconfig
commit 98a370e88960298cfbdb527d40fed3747e41da8a
Author: Hong Xu <hong@topbug.net>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
Massive reformatting of docstrings.
---
editorconfig.el | 60 +++++++++++++++++++++++++++++++++------------------------
1 file changed, 35 insertions(+), 25 deletions(-)
diff --git a/editorconfig.el b/editorconfig.el
index 4b336daab68..2e328284358 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)
@@ -142,14 +144,15 @@ property emacs_linum to decide whether to show line
numbers on the left
(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)
@@ -196,7 +199,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))))
@@ -208,7 +211,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")))
@@ -245,8 +249,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
@@ -269,8 +273,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))
@@ -284,9 +288,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))
@@ -295,3 +299,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:
- scratch/emacs-editorconfig 998d0e8f766 086/364: Bump version to 0.7.4, (continued)
- 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, 2024/06/18
- scratch/emacs-editorconfig 98a370e8896 127/364: Massive reformatting of docstrings.,
Stefan Monnier <=
- 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
- scratch/emacs-editorconfig eba248e638e 098/364: Fix english, Stefan Monnier, 2024/06/18