aboutsummaryrefslogtreecommitdiff
path: root/.dir-locals.el
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2018-08-11 12:50:50 +0200
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2018-08-11 12:50:50 +0200
commit1777783619a6a910c5522f658fec2eaaeed10922 (patch)
tree9ce63033d497e4bd82d39dfa4e8850625e55745f /.dir-locals.el
parent2af60e2d59c508c182a10ebc0de31b035b73cae8 (diff)
Problem with tabs in .mk file corrected in dir-locals.el
Previously we had tried to corrected the problem that `.mk' files use space instead of TAB by setting them to be read into makefile-mode at the start. However, for some reason, this caused a problem in reading the maximum line length (the value of 75 wasn't read by Emacs). So after some playing around, I found out that the problem is that the `nil' setting (for all other files) must be defined in the end, not the start of the basic settings and this solved this problem.
Diffstat (limited to '.dir-locals.el')
-rw-r--r--.dir-locals.el15
1 files changed, 7 insertions, 8 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
index 5606ae8..c6dd4df 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -9,16 +9,15 @@
;;
;; For more information see (info "(emacs) Directory Variables")
-;; Open `.mk' files in Makefile mode
-(add-to-list 'auto-mode-alist '("\\.mk$" . makefile-mode))
-
;; Basic settings.
-((nil
- (indent-tabs-mode . nil) ;; No tabs as indentation
- (fill-column . 75)) ;; 75-character wide lines
- (c-mode
+((c-mode ;; C files
(c-basic-offset . 2) ;; 2 spaces of indentation
(c-file-style . "gnu")) ;; GNU style for braces
- (makefile-mode
+
+ (makefile-mode ;; Makefiles
(indent-tabs-mode . t)) ;; Real TABs are important in makefiles
+
+(nil ;; All other files.
+ (indent-tabs-mode . nil) ;; No tabs as indentation
+ (fill-column . 75)) ;; 75-character wide lines
)