From: Lars Ingebrigtsen <larsi@gnus.org>
To: Matthew Leach <matthew@mattleach.net>
Cc: 19092@debbugs.gnu.org
Subject: bug#19092: 25.0.50; [PATCH] ispell-message spell checks marked parts of messages
Date: Tue, 23 Feb 2016 22:57:11 +1100 [thread overview]
Message-ID: <87r3g3prl4.fsf@gnus.org> (raw)
In-Reply-To: <8761ecjne8.fsf@loki.home> (Matthew Leach's message of "Tue, 18 Nov 2014 19:53:51 +0000")
Matthew Leach <matthew@mattleach.net> writes:
>> This changes behavior, so I think we should have a defcustom that
>> could be used to get the old behavior back. (And the NEWS entry
>> should describe that.)
>
> Ah, yes sorry about that. The revised patch fixes that.
The patch no longer applies, so I've tried to fit it in. However, the
patch is using variables defined in message.el. Does it make sense to
have ispell.el require 'message? That seems rather odd...
So I'm not sure this should go into Emacs in its present form...
diff --git a/etc/NEWS b/etc/NEWS
index 04c1ee8..2bbe246 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1637,6 +1637,11 @@ that happen, `unhandled-file-name-directory' now defaults to calling
\f
* Lisp Changes in Emacs 25.1
+---
+*** Marked parts of messages (created with C-c M-m) are no longer
+spell checked. To revert to the original behaviour set
+`ispell-message-check-marked-regions' to t.
+
** pcase
+++
*** New UPatterns `quote', `app'.
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index db03a32..fdbab5d 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -400,6 +400,16 @@ ispell-message-fcc-skip
:type '(choice integer (const :tag "off" nil))
:group 'ispell)
+(defcustom ispell-message-check-marked-regions nil
+ "When nil ispell-message will skip marked regions.
+These are regions that are enclosed with
+`message-mark-insert-begin' and `message-mark-insert-end'.
+
+When non-nil, ispell-message will check the spelling inside these
+regions."
+ :type '(choice (const :tag "Check spelling" t)
+ (const :tag "Don't check spellng" nil))
+ :group 'ispell)
(defcustom ispell-grep-command
;; MS-Windows/MS-DOS have `egrep' as a Unix shell script, so they
@@ -4167,11 +4177,18 @@ ispell-message
(concat "[^,;&+=\n]+ writes:" "\\|"
(ispell-non-empty-string vm-included-text-prefix)))
(t default-prefix)))
+ (message-mark-insert-begin-regexp
+ (concat "^" (regexp-quote message-mark-insert-begin)))
+ (message-mark-insert-end-regexp
+ (concat "^" (regexp-quote message-mark-insert-end)))
(ispell-skip-region-alist
- (cons (list (ispell--make-filename-or-URL-re))
- (cons (list (concat "^\\(" cite-regexp "\\)")
- (function forward-line))
- ispell-skip-region-alist)))
+ `(,@(unless ispell-message-check-marked-regions
+ (list (cons 'message-mark-insert-begin-regexp
+ 'message-mark-insert-end-regexp)))
+ ,(cons (list (ispell--make-filename-or-URL-re))
+ (list (concat "^\\(" cite-regexp "\\)")
+ (function forward-line)))
+ ,@ispell-skip-region-alist))
(old-case-fold-search case-fold-search)
(dictionary-alist ispell-message-dictionary-alist)
(ispell-checking-message t))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2016-02-23 11:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 10:55 bug#19092: 25.0.50; [PATCH] ispell-message spell checks marked parts of messages Matthew Leach
2014-11-18 15:54 ` Eli Zaretskii
2014-11-18 19:53 ` Matthew Leach
2016-02-23 11:57 ` Lars Ingebrigtsen [this message]
2019-06-25 21:10 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r3g3prl4.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=19092@debbugs.gnu.org \
--cc=matthew@mattleach.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.