[Piglit] [PATCH] dir-locals.el: whitespace support

Andres Gomez agomez at igalia.com
Fri Jul 8 15:40:32 UTC 2016


Highlight bogus indentation and long lines.

Signed-off-by: Andres Gomez <agomez at igalia.com>
---
 .dir-locals.el | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/.dir-locals.el b/.dir-locals.el
index 3bdca17..56fc226 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,11 +1,23 @@
 ((nil . ((indent-tabs-mode . t)
 	 (tab-width . 8)
-	 (show-trailing-whitespace . t)))
+	 (show-trailing-whitespace . t)
+	 (whitespace-style face indentation lines-tail)
+	 (whitespace-line-column . 79)))
  (prog-mode .
-	    ((c-file-style . "linux")))
+	    ((c-file-style . "linux")
+	     (eval ignore-errors
+		   (require 'whitespace)
+		   (whitespace-mode 1))))
  (cmake-mode .
-	     ((cmake-tab-width . 8)))
+	     ((cmake-tab-width . 8)
+	      (eval ignore-errors
+		    (require 'whitespace)
+		    (whitespace-mode 1))))
  (python-mode .
 	      ((indent-tabs-mode . nil)
-	       (tab-width . 4)))
+	       (tab-width . 4)
+	       (whitespace-line-column . 80)
+	       (eval ignore-errors
+		     (require 'whitespace)
+		     (whitespace-mode 1))))
  )
-- 
2.8.1



More information about the Piglit mailing list