[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/flymake-codespell f7ba43c2b1 07/15: Improve README.org
From: |
ELPA Syncer |
Subject: |
[elpa] externals/flymake-codespell f7ba43c2b1 07/15: Improve README.org |
Date: |
Mon, 30 Oct 2023 18:58:24 -0400 (EDT) |
branch: externals/flymake-codespell
commit f7ba43c2b129082d421052bd64f9baee8ec15828
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
Improve README.org
---
README.org | 81 +++++++++++++++++++++++-----------------------------
flymake-codespell.el | 13 ++++++++-
2 files changed, 47 insertions(+), 47 deletions(-)
diff --git a/README.org b/README.org
index 185b716ac7..0915bf80a1 100644
--- a/README.org
+++ b/README.org
@@ -1,39 +1,22 @@
* flymake-codespell
-This adds a [[https://github.com/codespell-project/codespell][codespell]]
backend for
[[https://www.gnu.org/software/emacs/manual/html_node/flymake/index.html][flymake-mode]]
in Emacs.
+This is a [[https://github.com/codespell-project/codespell][codespell]]
backend for
[[https://www.gnu.org/software/emacs/manual/html_node/flymake/index.html][Flymake]]
in Emacs, used to
+automatically highlight errors as you type. It requires Emacs version
+26.1 or newer.
-In comparison to other spellcheckers, codespell does not have a
-dictionary of known words. Instead it has a list of common typos, and
-checks only for those. This means that it's far less likely to
-generate false positives, especially when used on source code, or
-technical documentation and research.
+Unlike most other spellcheckers, codespell does not have a dictionary
+of known words. Instead it has a list of common typos, and checks
+only for those. This means that it's far less likely to generate
+false positives, especially when used on source code, or technical
+documentation and research.
* Prerequisites
-First, install ~codespell~. For example, if you're using Debian
-GNU/Linux, run this command in a terminal:
+First, install ~codespell~ on your system. For example, if you're
+using Debian GNU/Linux, run this command in a terminal:
: sudo apt install codespell
-For other distributions, it is something very similar to that.
-
-* Quick start
-
-If you're impatient, simply copy and paste this into your init file:
-
-: (use-package flymake-codespell
-: :ensure t
-: :hook (prog-mode . flymake-codespell-setup-backend))
-
-This will enable ~flymake-codespell~ in all programming language
-modes, and automatically install it the next time you restart Emacs.
-The above example works out-of-the-box on Emacs 29. For older
-versions, you must first install ~use-package~.
-
-* Installation
-
-You may also install codespell using ~pip~, or similar.
-
Once codespell is installed, install this package by typing the
following in Emacs:
@@ -42,29 +25,39 @@ following in Emacs:
* Usage
You must make sure the ~flymake-codespell-setup-backend~ function is
-called in the modes where you want to use it.
-
-For example, let's say you want to use it in all programming language
-modes. To make sure it is run in ~prog-mode~, which all programming
-language modes inherit, add the following line to your init file:
+called in the modes where you want to use it. For example, to make
+sure it is run in all programming language modes, add the following
+line to your init file:
: (add-hook 'prog-mode-hook 'flymake-codespell-setup-backend)
-You can substitute ~prog-mode-hook~ for the hook relevant to any mode
-you want. Some typical examples would be ~org-mode~, ~tex-mode~, and
-~markdown-mode~.
+You can substitute ~prog-mode-hook~ for any mode hook. For example,
+to add it to all text modes:
+
+: (add-hook 'text-mode-hook 'flymake-codespell-setup-backend)
+
+You must also make sure ~flymake~ is enabled in the same modes. Type
+~M-x flymake-mode~ to enable it for the running session, or set up
+hooks. For example:
+
+: (add-hook 'prog-mode-hook 'flymake-mode)
+
+See the
[[Https://www.gnu.org/software/emacs/manual/html_node/flymake/index.html][Flymake
manual]] for more details.
* Usage with use-package
-With ~use-package~, available out-of-the-box in Emacs 29 and from GNU
-ELPA for older versions, simply add the following to your init file:
+The ~use-package~ can simplify your init file, and is available
+out-of-the-box starting with Emacs 29.1. For older versions, you must
+first install ~use-package~. Here is a ~use-package~ declaration that
+you can copy into your init file:
: (use-package flymake-codespell
: :ensure t
: :hook (prog-mode . flymake-codespell-setup-backend))
-The ~:ensure t~ part makes sure the package is automatically installed
-when you're starting Emacs, if it isn't already.
+This enables ~flymake-codespell~ in all programming language modes,
+and automatically installs it the next time you restart Emacs, if it
+isn't already.
To add this to several modes, use something like the following:
@@ -73,18 +66,14 @@ To add this to several modes, use something like the
following:
: :hook ((prog-mode . flymake-codespell-setup-backend)
: (text-mode . flymake-codespell-setup-backend)))
-The ~text-mode~ hook will add this also to all modes inheriting
-~text-mode~ (but not special modes).
-
-You must also enable flymake, of course. This is documented in the
-~flymake~ manual, but here's a ~use-package~ declaration:
+Here's a ~use-package~ declaration to unable flymake in the same modes:
: (use-package flymake
-: :hook prog-mode)
+: :hook (prog-mode text-mode))
* Alternatives
-Here are some alternatives to codespell-flymake:
+Here are some alternatives to ~codespell-flymake~:
-
[[https://www.gnu.org/software/emacs/manual/html_node/emacs/Spelling.html#index-flyspell_002dprog_002dmode][flyspell-prog-mode]],
which comes with Emacs out-of-the-box.
diff --git a/flymake-codespell.el b/flymake-codespell.el
index 012ebfa6b4..792dcc16da 100644
--- a/flymake-codespell.el
+++ b/flymake-codespell.el
@@ -25,7 +25,15 @@
;;; Commentary:
-;; To use this, install this package using
+;; This adds a codespell backend for flymake-mode in Emacs.
+;;
+;; Unlike most other spellcheckers, codespell does not have a
+;; dictionary of known words. Instead it has a list of common typos,
+;; and checks only for those. This means that it’s far less likely to
+;; generate false positives, especially when used on source code, or
+;; technical documentation and research.
+;;
+;; Install this package using
;;
;; M-x package-install RET codespell RET
;;
@@ -42,6 +50,9 @@
;; `exec-path'.
;;
;; See the file README.org in this repository for more details.
+;;
+;; Bug reports, comments, and suggestions are welcome! Send them to
+;; Stefan Kangas <stefankangas@gmail.com> or report them on GitHub.
;;; Code:
- [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 <=
- [elpa] externals/flymake-codespell 41d99c4598 08/15: Add user option codespell-program-arguments, ELPA Syncer, 2023/10/30
- [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