[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)
- [Emacs-diffs] master updated (76e297c -> 86bec41), Reuben Thomas, 2016/11/03
- [Emacs-diffs] master 0a5ab4d 1/6: Fix bob/eob checks, Reuben Thomas, 2016/11/03
- [Emacs-diffs] master 2350bb9 4/6: Make whitespace-report-region respect current settings,
Reuben Thomas <=
- [Emacs-diffs] master 86bec41 6/6: Stop force parameter of whitespace-report-region having global effect, Reuben Thomas, 2016/11/03
- [Emacs-diffs] master 50bba7f 5/6: Document use of `tab-width', Reuben Thomas, 2016/11/03
- [Emacs-diffs] master a55c582 3/6: Fix whitespace-space-after-tab-regexp, Reuben Thomas, 2016/11/03
- [Emacs-diffs] master 96f3ae9 2/6: Remove duplicate documentation, Reuben Thomas, 2016/11/03