[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] scratch/editorconfig-cc de83e09632 243/351: Update docstring
From: |
Stefan Monnier |
Subject: |
[nongnu] scratch/editorconfig-cc de83e09632 243/351: Update docstring |
Date: |
Thu, 13 Jun 2024 18:38:58 -0400 (EDT) |
branch: scratch/editorconfig-cc
commit de83e09632e119be9ec5cb3c04844a3895708965
Author: 10sr <8.slashes@gmail.com>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
Update docstring
---
README.md | 2 +-
editorconfig-core-handle.el | 2 +-
editorconfig.el | 47 ++++++++++++++++++++++-----------------------
3 files changed, 25 insertions(+), 26 deletions(-)
diff --git a/README.md b/README.md
index dd957fa901..1680875a1f 100644
--- a/README.md
+++ b/README.md
@@ -81,7 +81,7 @@ only blocks of `web-mode`: it can be achieved by adding
following to your init.e
```emacs-lisp
(add-hook 'editorconfig-after-apply-functions
- (lambda (hash) (setq web-mode-block-padding 0)))
+ (lambda (props) (setq web-mode-block-padding 0)))
```
You can also define your own custom properties and enable them here.
diff --git a/editorconfig-core-handle.el b/editorconfig-core-handle.el
index aebc21d2cf..9685cc002b 100644
--- a/editorconfig-core-handle.el
+++ b/editorconfig-core-handle.el
@@ -57,7 +57,7 @@ Slots:
(defun editorconfig-core-handle-section-get-properties (section file dir)
"Return properties alist when SECTION name match FILE.
-DIR should be where the directory where .editorconfig which has SECTION exists.
+DIR should be the directory where .editorconfig file which has SECTION lives.
IF not match, return nil."
(when (editorconfig-core-handle--fnmatch-p
file
diff --git a/editorconfig.el b/editorconfig.el
index 5730239328..453c8cd36b 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -61,9 +61,9 @@ coding styles between different editors and IDEs."
(defcustom editorconfig-exec-path
"editorconfig"
- "EditorConfig executable name.
+ "Path to EditorConfig executable.
-This executable is invoked by `editorconfig-call-editorconfig-exec'."
+Used by `editorconfig-call-editorconfig-exec'."
:type 'string
:group 'editorconfig)
(define-obsolete-variable-alias
@@ -77,16 +77,16 @@ This executable is invoked by
`editorconfig-call-editorconfig-exec'."
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.
+not available. Keys of this hash should be symbols of properties, and values
+should be strings of their values.
For example, if you always want to use built-in core library instead
of any EditorConfig executable to get properties, add following to
your init.el:
-(set-variable 'editorconfig-get-properties-function
- #'editorconfig-core-get-properties-hash)
+ (set-variable 'editorconfig-get-properties-function
+ #'editorconfig-core-get-properties-hash)
Possible known values are:
@@ -226,23 +226,18 @@ If INDENT-SPEC-LIST is provided, each element of it must
have one of the
following forms:
1. VARIABLE
-
It means (VARIABLE . 1).
2. (VARIABLE . SPEC)
-
Setting VARIABLE according to the type of SPEC:
- Integer
-
The value is (* SPEC INDENT-SIZE);
- Function
-
The value is (funcall SPEC INDENT-SIZE);
- Any other type.
-
The value is SPEC.
NOTE: Only the **buffer local** value of VARIABLE will be set."
@@ -255,14 +250,17 @@ NOTE: Only the **buffer local** value of VARIABLE will be
set."
"0.5")
(defcustom editorconfig-exclude-modes ()
- "List of major mode symbols not to apply properties."
+ "Modes in which `editorconfig-mode-apply' will not run."
:type '(repeat (symbol :tag "Major Mode"))
:group 'editorconfig)
(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 regexp for buffer filenames `editorconfig-mode-apply' will not run.
+
+When variable `buffer-file-name' matches any of the regexps, then
+`editorconfig-mode-apply' will not do its work."
:type '(repeat string)
:group 'editorconfig)
@@ -275,7 +273,7 @@ Otherwise, use `delete-trailing-whitespace'."
:group 'editorconfig)
(defvar editorconfig-properties-hash nil
- "Hash object of EditorConfig properties for current buffer.
+ "Hash object of EditorConfig properties that was enabled for current buffer.
Set by `editorconfig-apply' and nil if that is not invoked in
current buffer yet.")
(make-variable-buffer-local 'editorconfig-properties-hash)
@@ -292,7 +290,7 @@ number - `lisp-indent-offset' is not set only if
indent_size is
`lisp-indent-offset'will not be set only if indent_size is 2.")
(defconst editorconfig-unset-value "unset"
- "String used to unset properties in .editorconfig .")
+ "String of value used to unset properties in .editorconfig .")
(defun editorconfig-string-integer-p (string)
"Return non-nil if STRING represents integer."
@@ -474,9 +472,9 @@ 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."
+ "Get and apply EditorConfig properties to current buffer.
+This function ignores `editorconfig-exclude-modes' and
+`editorconfig-exclude-regexps', and always applies available properties."
(interactive)
(when buffer-file-name
(condition-case err
@@ -513,9 +511,10 @@ applies available properties."
:error)))))
(defun editorconfig-mode-apply ()
- "Apply EditorConfig properties for current buffer.
-This function does the job only when the major mode is not listed
-in `editorconfig-exclude-modes'."
+ "Get and apply EditorConfig properties to current buffer.
+This function does nothing when the major mode is listed in
+`editorconfig-exclude-modes', or variable `buffer-file-name' matches
+any of regexps in `editorconfig-exclude-regexps'."
(when (and major-mode
(not (memq major-mode
editorconfig-exclude-modes))
@@ -528,9 +527,9 @@ in `editorconfig-exclude-modes'."
;;;###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'."
+
+To disable EditorConfig in some buffers, modify
+`editorconfig-exclude-modes' or `editorconfig-exclude-regexps'."
:global t
:lighter " EditorConfig"
;; See https://github.com/editorconfig/editorconfig-emacs/issues/141 for why
- [nongnu] scratch/editorconfig-cc e867da296c 124/351: Reindent using Emacs-lisp style., (continued)
- [nongnu] scratch/editorconfig-cc e867da296c 124/351: Reindent using Emacs-lisp style., Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc d8742edc38 168/351: Fix make doc command, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc ccfd1910f4 171/351: Remove unused variable, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc efffe74bbf 166/351: Remove doc/.gitignore, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 706ac40ec2 193/351: Make `fixtures' a constant (#176), Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 4b3784445a 180/351: Add trim-trailing-ws tests, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc b6d0bb7757 201/351: Do not call major-mode when already enabled (#178), Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 642ff1b62f 215/351: Use ws-butler when enabled and available., Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 9fdc9cc689 218/351: Add variable editorconfig-trim-whitespaces-mode, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 96123213ed 229/351: Add support for Emacs24.5, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc de83e09632 243/351: Update docstring,
Stefan Monnier <=
- [nongnu] scratch/editorconfig-cc 4beeb9c830 253/351: Make editorconfig-properties-hash permanetn-local, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc ee5b70f1e2 068/351: editorocnfig-core: Throw error when parsing .editorconfig failed, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 3bdd68d5af 069/351: Add tcl-mode indentation support, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 32fb0d6b9c 056/351: Use `require` instead of `load` in usage example, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 903e483a70 052/351: Make `editorconfig-apply' an interactive command, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 4fd932bb7c 060/351: Check package metadata using ert framework, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 56722d34df 019/351: Add sh-indentation to the list of indent variable., Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 92519a8c25 022/351: Don't set indent size if the given value makes no sense., Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc 242cc0ccea 045/351: Use core in elisp as a fallback, Stefan Monnier, 2024/06/13
- [nongnu] scratch/editorconfig-cc b1643c7360 077/351: Add support for scss-mode, Stefan Monnier, 2024/06/13