changeset 94400:049f194820fe

whitespace-trailing-regexp option fix.
author Vinicius Jose Latorre <viniciusjl@ig.com.br>
date Sun, 27 Apr 2008 11:50:47 +0000
parents 5901a9d70af5
children ed7a07d27b12
files lisp/ChangeLog lisp/whitespace.el
diffstat 2 files changed, 16 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Apr 27 10:44:37 2008 +0000
+++ b/lisp/ChangeLog	Sun Apr 27 11:50:47 2008 +0000
@@ -1,3 +1,12 @@
+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.
--- a/lisp/whitespace.el	Sun Apr 27 10:44:37 2008 +0000
+++ b/lisp/whitespace.el	Sun Apr 27 11:50:47 2008 +0000
@@ -6,7 +6,7 @@
 ;; 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.
@@ -744,7 +744,7 @@
 
 
 (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:
@@ -754,9 +754,8 @@
 
 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")
@@ -1476,7 +1475,7 @@
 	(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
@@ -1535,11 +1534,6 @@
 ;;;; 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
@@ -1565,7 +1559,7 @@
   (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)
@@ -2093,7 +2087,7 @@
        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))