[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/flymake-codespell 41d99c4598 08/15: Add user option cod
From: |
ELPA Syncer |
Subject: |
[elpa] externals/flymake-codespell 41d99c4598 08/15: Add user option codespell-program-arguments |
Date: |
Mon, 30 Oct 2023 18:58:24 -0400 (EDT) |
branch: externals/flymake-codespell
commit 41d99c45983e53c3728d25f58e59ffbdbb66356a
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Add user option codespell-program-arguments
---
README.org | 24 ++++++++++++++++++++++++
flymake-codespell.el | 15 ++++++++++++++-
2 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/README.org b/README.org
index 0915bf80a1..076062ab4d 100644
--- a/README.org
+++ b/README.org
@@ -71,6 +71,30 @@ Here's a ~use-package~ declaration to unable flymake in the
same modes:
: (use-package flymake
: :hook (prog-mode text-mode))
+* Customization
+
+To customize ~flymake-codespell~, type:
+
+: M-x customize-group RET flymake-codespell RET
+
+If you prefer adding customizations to your init file, try setting the
+variables ~flymake-codespell-program~ and
+~flymake-codespell-program-arguments~. These are their default
+values:
+
+: (setq flymake-codespell-program "codespell")
+: (setq flymake-codespell-program-arguments "")
+
+You could also use this ~use-package~ declaration:
+
+: (use-package flymake-codespell
+: :ensure t
+: :custom ((flymake-codespell-program "codespell")
+: (flymake-codespell-program-arguments ""))
+: :hook ((prog-mode . flymake-codespell-setup-backend)
+: (text-mode . flymake-codespell-setup-backend)))
+
+
* Alternatives
Here are some alternatives to ~codespell-flymake~:
diff --git a/flymake-codespell.el b/flymake-codespell.el
index 792dcc16da..837260f18c 100644
--- a/flymake-codespell.el
+++ b/flymake-codespell.el
@@ -66,6 +66,14 @@
"Name of the codespell executable."
:type 'string)
+(defcustom codespell-program-arguments ""
+ "Arguments passed to the codespell executable.
+The \"--disable-colors\" flag is passed unconditionally.
+
+See the Man page `codespell' or the output of running the command
+\"codespell --help\" for more details."
+ :type 'string)
+
(defvar flymake-codespell--process nil
"Currently running proceeed codespell process.")
@@ -83,7 +91,12 @@
(make-process
:name "flymake-codespell" :noquery t :connection-type 'pipe
:buffer (generate-new-buffer " *flymake-codespell*")
- :command `(,flymake-codespell-program "--disable-colors" "-")
+ :command `(,flymake-codespell-program
+ "--disable-colors"
+ ,@(when (and (stringp codespell-program-arguments)
+ (> (length codespell-program-arguments) 0))
+ (list codespell-program-arguments))
+ "-")
:sentinel
(lambda (proc _event)
(when (memq (process-status proc) '(exit signal))
- [elpa] branch externals/flymake-codespell created (now d72e3ad4cd), ELPA Syncer, 2023/10/30
- [elpa] externals/flymake-codespell 816d7dd5d9 02/15: Add README.org, ELPA Syncer, 2023/10/30
- [elpa] externals/flymake-codespell 15a2ae9094 05/15: Add .elpaignore, ELPA Syncer, 2023/10/30
- [elpa] externals/flymake-codespell 325b12e24f 09/15: Highlight only the matched word, ELPA Syncer, 2023/10/30
- [elpa] externals/flymake-codespell d72e3ad4cd 15/15: Prepare release on GNU ELPA; bump version to 0.1, ELPA Syncer, 2023/10/30
- [elpa] externals/flymake-codespell 58adc47c7f 01/15: Initial commit, ELPA Syncer, 2023/10/30
- [elpa] externals/flymake-codespell da9c09e25d 03/15: Improve comment headers and commentary, ELPA Syncer, 2023/10/30
- [elpa] externals/flymake-codespell 74fd62b40d 04/15: Add Makefile, ELPA Syncer, 2023/10/30
- [elpa] externals/flymake-codespell b95cb59730 06/15: Add GitHub CI workflow, ELPA Syncer, 2023/10/30
- [elpa] externals/flymake-codespell f7ba43c2b1 07/15: Improve README.org, ELPA Syncer, 2023/10/30
- [elpa] externals/flymake-codespell 41d99c4598 08/15: Add user option codespell-program-arguments,
ELPA Syncer <=
- [elpa] externals/flymake-codespell 15abe9fbe7 10/15: Update GPLv3 from gnulib, ELPA Syncer, 2023/10/30
- [elpa] externals/flymake-codespell a994271e1a 11/15: Add codespell action for GitHub CI, ELPA Syncer, 2023/10/30
- [elpa] externals/flymake-codespell b80075a0a5 13/15: Bump actions/checkout from 3 to 4, ELPA Syncer, 2023/10/30
- [elpa] externals/flymake-codespell d7782f3ab4 12/15: Fix typos, ELPA Syncer, 2023/10/30
- [elpa] externals/flymake-codespell 080738213b 14/15: Add dependency on `compat`, ELPA Syncer, 2023/10/30