From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reuben Thomas Newsgroups: gmane.emacs.bugs Subject: bug#13837: Update to code Date: Thu, 28 Feb 2013 02:00:41 +0000 Message-ID: References: <878v69fn8q.fsf@sc3d.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1362016883 15096 80.91.229.3 (28 Feb 2013 02:01:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Feb 2013 02:01:23 +0000 (UTC) To: 13837@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 28 03:01:45 2013 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 1UAsoV-00006V-61 for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Feb 2013 03:01:39 +0100 Original-Received: from localhost ([::1]:35615 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAsoA-0006DW-7g for geb-bug-gnu-emacs@m.gmane.org; Wed, 27 Feb 2013 21:01:18 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAso6-0006DR-B5 for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2013 21:01:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UAso2-0005bW-Bl for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2013 21:01:14 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49107) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UAso2-0005bQ-7r for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2013 21:01:10 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UAspp-0005eJ-VL for bug-gnu-emacs@gnu.org; Wed, 27 Feb 2013 21:03:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <878v69fn8q.fsf@sc3d.org> Resent-From: Reuben Thomas Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Feb 2013 02:03: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.136201696621693 (code B ref 13837); Thu, 28 Feb 2013 02:03:01 +0000 Original-Received: (at 13837) by debbugs.gnu.org; 28 Feb 2013 02:02:46 +0000 Original-Received: from localhost ([127.0.0.1]:54571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UAspY-0005dp-KD for submit@debbugs.gnu.org; Wed, 27 Feb 2013 21:02:46 -0500 Original-Received: from exprod7og104.obsmtp.com ([64.18.2.161]:47441) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1UAspS-0005dc-5Q for 13837@debbugs.gnu.org; Wed, 27 Feb 2013 21:02:43 -0500 Original-Received: from mail-bk0-f70.google.com ([209.85.214.70]) (using TLSv1) by exprod7ob104.postini.com ([64.18.6.12]) with SMTP ID DSNKUS66S1ezpB7JUkTJOPFjq5RBIIDmmQ93@postini.com; Wed, 27 Feb 2013 18:00:44 PST Original-Received: by mail-bk0-f70.google.com with SMTP id jk7so1411051bkc.5 for <13837@debbugs.gnu.org>; Wed, 27 Feb 2013 18:00:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-received:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=JahKEHzfv0aOn2C+QZGsrvHL2YyRpW6Iq80q49euRs0=; b=VeGcgEt6sHGkPSc/eaMGC80GnRfCGscUY6ZTZ4HQ3umRFczXpVq0G2QQmuBSzTdvg3 kuFk2pXPY9lHnReUs5YDDohfiqGSshoPt77/j4NDUDY3Hg7bd8OCQMVv+INKf7GYTG5J 4wrWks608kPyrLxpvO73RHPAsznTWmAzrbplbresftK6GDY5PhNwICv/usRv8ElliKlJ CDHcLvyOuOVRojsM4iqpJdUo0h1Xhs53XoFSLuXKGC70AHPkqwIJoaWvDwWUCFfNVQhr OqMU4zyD3eovLIMM94PkI4D9FcEKEsl6b5l5dbir5NiCHaUlgH3t0rgCgYkc5FAjaCrY FPlg== X-Received: by 10.112.88.5 with SMTP id bc5mr2911644lbb.50.1362016841827; Wed, 27 Feb 2013 18:00:41 -0800 (PST) X-Received: by 10.112.88.5 with SMTP id bc5mr2911641lbb.50.1362016841646; Wed, 27 Feb 2013 18:00:41 -0800 (PST) Original-Received: by 10.152.5.40 with HTTP; Wed, 27 Feb 2013 18:00:41 -0800 (PST) X-Gm-Message-State: ALoCoQnNfOva+lppER6OPbvDMaSVchzHeUmhxkQPYh3vBb8GfnX7p3VRfRUgZpk4Zgedd9IGhcyV1ABSIH0Fq968zn/sKr0KVRG/fMahX0l2xrMb7XtztqinaQ/lEqIRf3avzARAYIOkXHu3DvHexT3JxacnefWg9IiMeVMaq/3oe5ASn1x3+Wg= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:71934 Archived-At: Apologies, the original code posted contained two lines which shouldn't've been there, mentioning a non-existent "force" parameter to whitespace-test-region. The function should read: (defun whitespace-test-region (start end) "Find whether there are whitespace problems in a region. Return nil if there is no whitespace problem; otherwise, return non-nil. A whitespace problem is one of the following: * If `indent-tabs-mode' is non-nil: empty 1. empty lines at beginning of buffer. empty 2. empty lines at end of buffer. trailing 3. SPACEs or TABs at end of line. indentation 4. 8 or more SPACEs at beginning of line. space-before-tab 5. SPACEs before TAB. space-after-tab 6. 8 or more SPACEs after TAB. * If `indent-tabs-mode' is nil: empty 1. empty lines at beginning of buffer. empty 2. empty lines at end of buffer. trailing 3. SPACEs or TABs at end of line. indentation 4. TABS at beginning of line. space-before-tab 5. SPACEs before TAB. space-after-tab 6. 8 or more SPACEs after TAB. See `whitespace-style' for documentation. See also `whitespace-cleanup' and `whitespace-cleanup-region' for cleaning up these problems." (save-excursion (save-match-data ;FIXME: Why? (let* ((has-bogus nil) (rstart (min start end)) (rend (max start end)) (bogus-list (mapcar #'(lambda (option) (goto-char rstart) (let ((regexp (cond ((eq (car option) 'indentation) (whitespace-indentation-regexp)) ((eq (car option) 'indentation::tab) (whitespace-indentation-regexp 'tab)) ((eq (car option) 'indentation::space) (whitespace-indentation-regexp 'space)) ((eq (car option) 'space-after-tab) (whitespace-space-after-tab-regexp)) ((eq (car option) 'space-after-tab::tab) (whitespace-space-after-tab-regexp 'tab)) ((eq (car option) 'space-after-tab::space) (whitespace-space-after-tab-regexp 'space)) (t (cdr option))))) (and (re-search-forward regexp rend t) (setq has-bogus t)))) whitespace-report-list))) has-bogus)))) -- http://rrt.sc3d.org