From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthew Leach Newsgroups: gmane.emacs.bugs Subject: bug#19092: 25.0.50; [PATCH] ispell-message spell checks marked parts of messages Date: Tue, 18 Nov 2014 10:55:45 +0000 Message-ID: <87oas4bwwe.fsf@loki.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1416308257 11920 80.91.229.3 (18 Nov 2014 10:57:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Nov 2014 10:57:37 +0000 (UTC) To: 19092@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 18 11:57:29 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XqgTQ-0004ZS-Qn for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Nov 2014 11:57:29 +0100 Original-Received: from localhost ([::1]:52366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqgTQ-0007yq-Hu for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Nov 2014 05:57:28 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37525) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqgT7-0007fQ-VH for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2014 05:57:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqgT0-0002zG-Li for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2014 05:57:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqgT0-0002zC-JV for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2014 05:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XqgT0-00082C-9h for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2014 05:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Matthew Leach Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Nov 2014 10:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19092 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141630817530820 (code B ref -1); Tue, 18 Nov 2014 10:57:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 18 Nov 2014 10:56:15 +0000 Original-Received: from localhost ([127.0.0.1]:36860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XqgSE-000811-Qm for submit@debbugs.gnu.org; Tue, 18 Nov 2014 05:56:15 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35523) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XqgSD-00080u-1d for submit@debbugs.gnu.org; Tue, 18 Nov 2014 05:56:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqgS5-0002e0-EV for submit@debbugs.gnu.org; Tue, 18 Nov 2014 05:56:12 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:59849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqgS5-0002dq-C8 for submit@debbugs.gnu.org; Tue, 18 Nov 2014 05:56:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqgRy-0007Nq-Q0 for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2014 05:56:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XqgRs-0002S5-Gk for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2014 05:55:58 -0500 Original-Received: from mx0.mattleach.net ([176.58.118.143]:50046) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XqgRs-0002Rz-BZ for bug-gnu-emacs@gnu.org; Tue, 18 Nov 2014 05:55:52 -0500 Original-Received: by mx0.mattleach.net (Postfix, from userid 99) id 8732C61AC8; Tue, 18 Nov 2014 10:55:51 +0000 (GMT) Original-Received: from loki.home.mattleach.net (host86-157-143-67.range86-157.btcentralplus.com [86.157.143.67]) by mx0.mattleach.net (Postfix) with ESMTPSA id EE2EB61ABC for ; Tue, 18 Nov 2014 10:55:45 +0000 (GMT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:96184 --=-=-= Content-Type: text/plain emacs -Q C-x m C-c C-b some wrong spelllling. C- C-p C-c M-m M-x ispell-message you should now be prompted to spell check the word spelllling. Since text in the marked parts of messages is usually quoted -- be it text, code or otherwise -- I propose that we skip spell checking on these parts of messages. It can be a real hassle when quoting a large body of code or text. Attached is a patch to implement this. Any comments welcome. Thanks, Matt lisp/ChangeLog: 2014-11-18 Matthew Leach * textmodes/ispell.el (ispell-message): add regexp versions of `message-mark-insert-begin' and `message-mark-insert-end' to `ispell-skip-region-alist' to skip marked message parts. etc/ChangeLog: 2014-11-18 Matthew Leach * NEWS: Mention ispell-message now skips marked message parts. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=ispell-skip-maked-message-part.patch diff --git a/etc/NEWS b/etc/NEWS index 05210df..bdad732 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -161,6 +161,9 @@ buffers you want to keep separate. *** text/html messages that contain inline image parts will be transformed into multipart/related messages before sending. +*** Marked parts of messages (created with C-c M-m) are no longer +spell checked. + ** pcase *** New UPatterns `quote' and `app'. *** New UPatterns can be defined with `pcase-defmacro'. diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 0fc6b4a..6d537c2 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -4095,10 +4095,18 @@ You can bind this to the key C-c i in GNUS or mail by adding to (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 (concat "^\\(" cite-regexp "\\)") - (function forward-line)) - ispell-skip-region-alist)) + (append + (list + (cons message-mark-insert-begin-regexp + message-mark-insert-end-regexp) + (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)) --=-=-=--