[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/spell-fu 9180a77865 48/86: Fix #15: don't enable (when use
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/spell-fu 9180a77865 48/86: Fix #15: don't enable (when used globally) for application buffers |
Date: |
Thu, 7 Jul 2022 12:03:42 -0400 (EDT) |
branch: elpa/spell-fu
commit 9180a778655a4ba80fdc696551ef43c5e172d426
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Fix #15: don't enable (when used globally) for application buffers
Skip all buffers that use a mode derived from 'special-mode',
which is used for application buffers (not text).
(spell-fu-mode) can still be enabled explicitly, it just won't be turned
on for special modes by default when `global-spell-fu-mode` is used.
---
changelog.rst | 2 ++
spell-fu.el | 11 ++++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/changelog.rst b/changelog.rst
index 3b49e7244d..f0e50bb759 100644
--- a/changelog.rst
+++ b/changelog.rst
@@ -5,6 +5,8 @@ Change Log
- In development.
+ - ``global-spell-fu-mode`` no longer enables spell-fu for modes derived from
``special-mode``
+ such as package list for example (fixes ``#15``).
- Support conditionally disabling ``global-spell-fu-mode`` via
``global-spell-fu-ignore-buffer`` & ``global-spell-fu-ignore-modes``.
diff --git a/spell-fu.el b/spell-fu.el
index 5ea269a8fb..8100e231cf 100644
--- a/spell-fu.el
+++ b/spell-fu.el
@@ -1079,7 +1079,16 @@ Return t when the word is removed."
"Enable the option `spell-fu-mode' where possible."
(when
(and
- (not spell-fu-mode) (not (minibufferp)) (not (memq major-mode
spell-fu-ignore-modes))
+ ;; Not already enabled.
+ (not spell-fu-mode)
+ ;; Not in the mini-buffer.
+ (not (minibufferp))
+ ;; Not a special mode (package list, tabulated data ... etc)
+ ;; Instead the buffer is likely derived from `text-mode' or `prog-mode'.
+ (not (derived-mode-p 'special-mode))
+ ;; Not explicitly ignored.
+ (not (memq major-mode spell-fu-ignore-modes))
+ ;; Optionally check if a function is used.
(or
(null global-spell-fu-ignore-buffer)
(if (functionp global-spell-fu-ignore-buffer)
- [nongnu] elpa/spell-fu 32fcbd9e8e 68/86: Initial changes for multiple dictionaries, (continued)
- [nongnu] elpa/spell-fu 32fcbd9e8e 68/86: Initial changes for multiple dictionaries, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 1f3e5b8f05 72/86: readme: Fix typos, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 2f2fd6de00 83/86: Change URL to codeberg, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 00b75e5741 25/86: Cleanup: docstring, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 1bc18879b6 27/86: Add license file, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu d0700095ea 28/86: Add header to cache loading & error checking for cache content, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu f6c849f860 30/86: Fix disabling spell-fu when used without a timer, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 502d523b46 31/86: Fix unintended modification of the standard syntax table, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu e62cfc4f08 34/86: Add support for personal dictionary management, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 86d46cf63e 37/86: fix: encode word to utf8, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 9180a77865 48/86: Fix #15: don't enable (when used globally) for application buffers,
ELPA Syncer <=
- [nongnu] elpa/spell-fu 41a133d119 52/86: Fix #16: Fails to spellcheck when whitespace-mode splits a word, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 7c2542e109 73/86: Merge branch 'multiple-dictionaries' into 'master', ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 50be652a6e 77/86: Fix overlay faces masking other faces (when checking faces-at-point), ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu cbe5cd84c3 86/86: Correct URL, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 41a7ebcbab 23/86: Cleanup: replace cl-letf with advice macro, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 251e63eacc 29/86: readme: update, clarify TODO, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu ad139f6fac 40/86: Cleanup: quiet checkdoc warning, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 2caa9fc6f0 44/86: Update changelog, ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu f38bebefea 62/86: Cleanup: replace 'if' with 'cond', ELPA Syncer, 2022/07/07
- [nongnu] elpa/spell-fu 9587fa4b99 17/86: Add missing args (quiet checkdoc warnings), ELPA Syncer, 2022/07/07