emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r117199: Improve non-interactive use of whitespace r


From: Reuben Thomas
Subject: [Emacs-diffs] trunk r117199: Improve non-interactive use of whitespace reporting
Date: Thu, 29 May 2014 22:52:19 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117199
revision-id: address@hidden
parent: address@hidden
committer: Reuben Thomas <address@hidden>
branch nick: trunk
timestamp: Thu 2014-05-29 23:51:47 +0100
message:
  Improve non-interactive use of whitespace reporting
  
    whitespace.el (whitespace-report-region): Allow report-if-bogus to take
    the value `never', for non-interactive use.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/whitespace.el             
whitespace.el-20091113204419-o5vbwnq5f7feedwu-8268
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-05-29 22:43:26 +0000
+++ b/lisp/ChangeLog    2014-05-29 22:51:47 +0000
@@ -2,6 +2,8 @@
 
        * whitespace.el (whitespace-report-region): Simplify
        documentation.
+       (whitespace-report-region): Allow report-if-bogus to take the
+       value `never', for non-interactive use.
        (whitespace-report): Refer to whitespace-report-region's
        documentation.
 

=== modified file 'lisp/whitespace.el'
--- a/lisp/whitespace.el        2014-05-29 22:43:26 +0000
+++ b/lisp/whitespace.el        2014-05-29 22:51:47 +0000
@@ -1737,13 +1737,14 @@
 forces `whitespace-style' to have:
 
    empty
+   trailing
    indentation
    space-before-tab
-   trailing
    space-after-tab
 
-If REPORT-IF-BOGUS is non-nil, it reports only when there are any
-whitespace problems in buffer.
+If REPORT-IF-BOGUS is t, it reports only when there are any
+whitespace problems in buffer; if it is `never', it does not
+report problems.
 
 Report if some of the following whitespace problems exist:
 
@@ -1798,7 +1799,7 @@
                     (and (re-search-forward regexp rend t)
                          (setq has-bogus t))))
               whitespace-report-list)))
-       (when (if report-if-bogus has-bogus t)
+       (when (pcase report-if-bogus (`nil t) (`never nil) (_ has-bogus))
          (whitespace-kill-buffer whitespace-report-buffer-name)
          ;; `whitespace-indent-tabs-mode' is local to current buffer
          ;; `whitespace-tab-width' is local to current buffer


reply via email to

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