From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13837: 24.2; Make it possible to turn whitespace-mode only when there are no existing problems Date: Mon, 27 Jan 2014 19:32:41 -0500 Message-ID: References: <1390857567.273549.1665@skwd> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1390869198 7988 80.91.229.3 (28 Jan 2014 00:33:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jan 2014 00:33:18 +0000 (UTC) Cc: 13837@debbugs.gnu.org, Dmitry Gutov To: Reuben Thomas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 28 01:33:24 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 1W7wcD-0008Km-2i for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Jan 2014 01:33:21 +0100 Original-Received: from localhost ([::1]:34259 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7wcC-0007YK-Lu for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Jan 2014 19:33:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41538) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7wc2-0007O3-3I for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 19:33:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7wbu-0006Jl-P4 for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 19:33:10 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7wbu-0006Jg-Kt for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 19:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W7wbt-0002Cw-PJ for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 19:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Jan 2014 00:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13837 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13837-submit@debbugs.gnu.org id=B13837.13908691648461 (code B ref 13837); Tue, 28 Jan 2014 00:33:01 +0000 Original-Received: (at 13837) by debbugs.gnu.org; 28 Jan 2014 00:32:44 +0000 Original-Received: from localhost ([127.0.0.1]:38469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W7wbc-0002CO-0t for submit@debbugs.gnu.org; Mon, 27 Jan 2014 19:32:44 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:48595) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W7wba-0002CF-Ef for 13837@debbugs.gnu.org; Mon, 27 Jan 2014 19:32:42 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+IO1/2dsb2JhbABEvw4Xc4IfAQVWIxALDiYHCxQYDSSIJMEtkQoDiGGcGYFegxU X-IPAS-Result: Av4EABK/CFHO+IO1/2dsb2JhbABEvw4Xc4IfAQVWIxALDiYHCxQYDSSIJMEtkQoDiGGcGYFegxU X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="46210377" Original-Received: from 206-248-131-181.dsl.teksavvy.com (HELO pastel.home) ([206.248.131.181]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 27 Jan 2014 19:32:41 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id A193F60EE1; Mon, 27 Jan 2014 19:32:41 -0500 (EST) In-Reply-To: <1390857567.273549.1665@skwd> (Reuben Thomas's message of "Mon, 27 Jan 2014 21:19:27 -0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) 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:84146 Archived-At: > -(defun whitespace-report (&optional force report-if-bogus) > +(defun whitespace-report (&optional force report) I'd leave the name unchanged. Will make for a cleaner diff and the name "report" is not convincingly better. > +If REPORT is t, it reports only when there are any whitespace > +problems in buffer; if it is 'never, it does not report problems. ^^^^^^ should be `never' > +problems in buffer; if it is 'never, it does not report problems. ^^^^^^ should be `never' > * If `indent-tabs-mode' is non-nil: > + indentation 6. 8 or more SPACEs at beginning of line. > * If `indent-tabs-mode' is nil: > + indentation 6. TABS at beginning of line. Why not indentation 6. if `indent-tabs-mode': 8 or more SPACEs at beginning of line else: TABS at beginning of line. > - (when (if report-if-bogus has-bogus t) > + (when (if (equal report t) has-bogus (null report)) For better backward compatibility, this should check for `never' and treat any other non-nil value as t. IOW (when (pcase report-if-bogus (`nil t) (`never nil) (_ has-bogus)) -- Stefan