diff options
| -rw-r--r-- | lisp/whitespace.el | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/whitespace.el b/lisp/whitespace.el index 1986b525d42..2cf014cc53e 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el | |||
| @@ -737,8 +737,8 @@ Used when `whitespace-style' includes `empty'." | |||
| 737 | 737 | ||
| 738 | 738 | ||
| 739 | (defcustom whitespace-space-after-tab-regexp | 739 | (defcustom whitespace-space-after-tab-regexp |
| 740 | '("\t+\\(\\( \\{%d\\}\\)+\\)" | 740 | '("\t+\\(\\( \\{%d,\\}\\)+\\)" |
| 741 | . "\\(\t+\\) +") | 741 | . "\\(\t+\\) \\{%d,\\}") |
| 742 | "Specify regexp for 8 or more SPACEs after TAB. | 742 | "Specify regexp for 8 or more SPACEs after TAB. |
| 743 | 743 | ||
| 744 | It is a cons where the cons car is used for SPACEs visualization | 744 | It is a cons where the cons car is used for SPACEs visualization |
| @@ -1566,13 +1566,15 @@ See also `tab-width'." | |||
| 1566 | 1566 | ||
| 1567 | (defun whitespace-regexp (regexp &optional kind) | 1567 | (defun whitespace-regexp (regexp &optional kind) |
| 1568 | "Return REGEXP depending on `whitespace-indent-tabs-mode'." | 1568 | "Return REGEXP depending on `whitespace-indent-tabs-mode'." |
| 1569 | (cond | 1569 | (format |
| 1570 | ((or (eq kind 'tab) | 1570 | (cond |
| 1571 | whitespace-indent-tabs-mode) | 1571 | ((or (eq kind 'tab) |
| 1572 | (format (car regexp) whitespace-tab-width)) | 1572 | whitespace-indent-tabs-mode) |
| 1573 | ((or (eq kind 'space) | 1573 | (car regexp)) |
| 1574 | (not whitespace-indent-tabs-mode)) | 1574 | ((or (eq kind 'space) |
| 1575 | (cdr regexp)))) | 1575 | (not whitespace-indent-tabs-mode)) |
| 1576 | (cdr regexp))) | ||
| 1577 | whitespace-tab-width)) | ||
| 1576 | 1578 | ||
| 1577 | 1579 | ||
| 1578 | (defun whitespace-indentation-regexp (&optional kind) | 1580 | (defun whitespace-indentation-regexp (&optional kind) |