+2008-04-27 Vinicius Jose Latorre <viniciusjl@ig.com.br>
+
+ * whitespace.el: New version 11.1.
+ (whitespace-trailing-regexp): Option fix, now trailing regexp must be
+ enclosed by \\( and \\)$. Docstring fix.
+ (whitespace-trailing-regexp): Fun removed.
+ (whitespace-report-list): Const initialization fix.
+ (whitespace-color-on): Code fix.
+
2008-04-27 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-replace-environment-variables): New defun.
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Keywords: data, wp
-;; Version: 11.0
+;; Version: 11.1
;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
;; This file is part of GNU Emacs.
(defcustom whitespace-trailing-regexp
- "\t\\| \\|\xA0\\|\x8A0\\|\x920\\|\xE20\\|\xF20"
+ "\\(\\(\t\\| \\|\xA0\\|\x8A0\\|\x920\\|\xE20\\|\xF20\\)+\\)$"
"*Specify trailing characters regexp.
If you're using `mule' package, there may be other characters besides:
that should be considered blank.
-NOTE: DO NOT enclose by \\\\( and \\\\) the elements to highlight.
- `whitespace-mode' surrounds this regexp by \"\\\\(\\\\(\" and
- \"\\\\)+\\\\)$\".
+NOTE: Enclose always by \"\\\\(\\\\(\" and \"\\\\)+\\\\)$\" the elements to highlight.
+ Use exactly one pair of enclosing elements above.
Used when `whitespace-style' includes `trailing'."
:type '(regexp :tag "Trailing Chars")
(when (memq 'trailing whitespace-style)
(whitespace-replace-action
'delete-region rstart rend
- (whitespace-trailing-regexp) 1))
+ whitespace-trailing-regexp 1))
;; PROBLEM 4: 8 or more SPACEs after TAB
(cond
;; ACTION: replace 8 or more SPACEs by TABs, if
;;;; User command - report
-(defun whitespace-trailing-regexp ()
- "Make the `whitespace-trailing-regexp' regexp."
- (concat "\\(\\(" whitespace-trailing-regexp "\\)+\\)$"))
-
-
(defun whitespace-regexp (regexp &optional kind)
"Return REGEXP depending on `whitespace-indent-tabs-mode'."
(cond
(list
(cons 'empty whitespace-empty-at-bob-regexp)
(cons 'empty whitespace-empty-at-eob-regexp)
- (cons 'trailing (whitespace-trailing-regexp))
+ (cons 'trailing whitespace-trailing-regexp)
(cons 'indentation nil)
(cons 'indentation::tab nil)
(cons 'indentation::space nil)
nil
(list
;; Show trailing blanks
- (list (whitespace-trailing-regexp) 1 whitespace-trailing t))
+ (list whitespace-trailing-regexp 1 whitespace-trailing t))
t))
(when (or (memq 'lines whitespace-active-style)
(memq 'lines-tail whitespace-active-style))