Mesa (master): dir-locals.el: Adds White Space support
Andres Gomez
tanty at kemper.freedesktop.org
Mon Nov 14 17:18:22 UTC 2016
Module: Mesa
Branch: master
Commit: 5923088d754d448616678f05ddd27d70760d4534
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5923088d754d448616678f05ddd27d70760d4534
Author: Andres Gomez <agomez at igalia.com>
Date: Wed Nov 9 18:32:41 2016 +0200
dir-locals.el: Adds White Space support
Trailing white spaces will be now always highlighted, not just in
prog-mode.
Also, the White Space package, which is available since GNU Emacs 22,
is loaded and activated locally in prog-mode.
Additionally, using White Space variables, we set highlighting through
faces on wrong indentation and the maximum length of a coding line.
Notice that:
- The highlighting for the characters beyond the set length of a
coding line is not activated by default, only for wrong
indentations.
- If the White Space package is not available, errors on loading or
activation are ignored.
- If the White Space mode is not activated the set variables would
not have any effect.
v2: Removed too long lines trail highlighting, as suggested by Ilia
Mirkin.
Signed-off-by: Andres Gomez <agomez at igalia.com>
Acked-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
.dir-locals.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/.dir-locals.el b/.dir-locals.el
index 4b53931..5340c3a 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,4 +1,5 @@
-((prog-mode
+((nil . ((show-trailing-whitespace . t)))
+ (prog-mode
(indent-tabs-mode . nil)
(tab-width . 8)
(c-basic-offset . 3)
@@ -8,6 +9,10 @@
(c-set-offset 'case-label '0)
(c-set-offset 'innamespace '0)
(c-set-offset 'inline-open '0)))
- )
+ (whitespace-style face indentation)
+ (whitespace-line-column . 79)
+ (eval ignore-errors
+ (require 'whitespace)
+ (whitespace-mode 1)))
(makefile-mode (indent-tabs-mode . t))
)
More information about the mesa-commit
mailing list