emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 2350bb9 4/6: Make whitespace-report-region respect


From: Reuben Thomas
Subject: [Emacs-diffs] master 2350bb9 4/6: Make whitespace-report-region respect current settings
Date: Thu, 3 Nov 2016 12:17:07 +0000 (UTC)

branch: master
commit 2350bb95316f51d42e3abebd199126482c519744
Author: Reuben Thomas <address@hidden>
Commit: Reuben Thomas <address@hidden>

    Make whitespace-report-region respect current settings
    
    * lisp/whitespace.el (whitespace-report-region): Make it respect
    whitespace-style, including any additions made by the force parameter.
    This means that the function does not return t unless a whitespace
    problem that the user cares about is reported.  (Bug#24745)
---
 lisp/whitespace.el |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index 2cf014c..a270a19 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -1740,8 +1740,10 @@ cleaning up these problems."
                            (whitespace-space-after-tab-regexp 'space))
                           (t
                            (cdr option)))))
-                    (and (re-search-forward regexp rend t)
-                         (setq has-bogus t))))
+                    (when (re-search-forward regexp rend t)
+                       (unless has-bogus
+                         (setq has-bogus (memq (car option) whitespace-style)))
+                       t)))
               whitespace-report-list)))
        (when (pcase report-if-bogus (`nil t) (`never nil) (_ has-bogus))
          (whitespace-kill-buffer whitespace-report-buffer-name)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]