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 10:00:30 -0500 Message-ID: References: <878v69fn8q.fsf@sc3d.org> <87mwiiz5im.fsf@yandex.ru> <52E5A807.1040804@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1390834874 7574 80.91.229.3 (27 Jan 2014 15:01:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jan 2014 15:01:14 +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 Mon Jan 27 16:01:20 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 1W7ngd-0006rC-LS for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Jan 2014 16:01:19 +0100 Original-Received: from localhost ([::1]:60019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7ngd-0005mo-7g for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Jan 2014 10:01:19 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7ngT-0005jw-HI for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 10:01:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7ngM-0002Tu-0w for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 10:01:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52456) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7ngL-0002To-UH for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 10:01:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W7ngL-0002At-J5 for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 10:01: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: Mon, 27 Jan 2014 15:01: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.13908348358324 (code B ref 13837); Mon, 27 Jan 2014 15:01:01 +0000 Original-Received: (at 13837) by debbugs.gnu.org; 27 Jan 2014 15:00:35 +0000 Original-Received: from localhost ([127.0.0.1]:38242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W7nfu-0002AB-V7 for submit@debbugs.gnu.org; Mon, 27 Jan 2014 10:00:35 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:49680) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W7nfr-0002A1-Es for 13837@debbugs.gnu.org; Mon, 27 Jan 2014 10:00:32 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+IO1/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYHCxQYDSSIHgbBLZEKA4hhnBmBXoMV X-IPAS-Result: Av4EABK/CFHO+IO1/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYHCxQYDSSIHgbBLZEKA4hhnBmBXoMV X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="46156759" 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 10:00:30 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 766FB60621; Mon, 27 Jan 2014 10:00:30 -0500 (EST) In-Reply-To: (Reuben Thomas's message of "Mon, 27 Jan 2014 13:25:01 +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:84113 Archived-At: >> But it's not obviously safe to me. Two non-obvious parts are: >> - the removal of "(add-to-list 'whitespace-style (car option))". > The removal looks wrong to me too: without that code, the force argument > has no effect. On the other hand, the way it's implemented also seems > wrong, as it permanently changes whitespace-style. Agreed on both aspects. >> - the change from has-bogus to bogus-list, where bogus-list will >> (initially) only be nil if whitespace-report-list is nil. > As far as I can see, has-bogus was set whenever an element was added to > bogus-list. The way I read the code bogus-list is a list of booleans (either nil or t), returned by `mapcar', so it has as many elements as whitespace-report-list. IOW an element was/is added to bogus-list regardless if a test succeeds/fails. > 1. I would like to refactor the description of whitespace problems in > whitespace-report-region to move those which are the same regardless of the > value of indent-tabs-mode into a separate list. Fine. > 2. Since we're no longer going for getting this into 24.4, can we fold your > "artificial" whitespace--report-report-region back into > whitespace-report-region, which both simplifies the end result slightly, > and avoids the question of whether the new function should be moved down > into "internal functions"? Of course, Stefan