Commit 16fabfb3 authored by Andres Gomez's avatar Andres Gomez

dir-locals.el: Adds White Space support

The White Space package, which is available since GNU Emacs 22, is
loaded and activated locally in prog-mode and cmake-mode.

Also, 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
 - 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: python-mode inherits from prog-mode
v3: Removed too long lines trail highlighting, as suggested by Ilia
Signed-off-by: Andres Gomez's avatarAndres Gomez <>
Acked-by: Ilia Mirkin's avatarIlia Mirkin <>
parent 76a2960c
((nil . ((indent-tabs-mode . t)
(tab-width . 8)
(show-trailing-whitespace . t)))
(show-trailing-whitespace . t)
(whitespace-style face indentation)
(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)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment