aboutsummaryrefslogtreecommitdiffstats
path: root/.dir-locals.el
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-27 06:11:09 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-27 06:11:09 +0000
commit070a4aa0f00bd466fe52c526a0e862092cdcfa81 (patch)
tree99eced135f98e35a97590110de03814e338d09b6 /.dir-locals.el
parent1680a13a926b17661329beec1ded6b32aad16c1b (diff)
downloadruby-070a4aa0f00bd466fe52c526a0e862092cdcfa81.tar.gz
add .dir-locals.el [ci skip]
Recent Emacs (23 and up?) has this feature called .dir-locals.el. See also: https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to '.dir-locals.el')
-rw-r--r--.dir-locals.el37
1 files changed, 37 insertions, 0 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 0000000000..7c32d1f7ee
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,37 @@
+;; Copyright (c) 2018 Urabe, Shyouhei. All rights reserved.
+;;
+;; This file is a part of the programming language Ruby. Permission is hereby
+;; granted, to either redistribute and/or modify this file, provided that the
+;; conditions mentioned in the file COPYING are met. Consult the file for
+;; details.
+
+((nil .
+ ((indent-tabs-mode . nil)
+ (require-final-newline . t)
+ (tab-width . 8)
+ (show-trailing-whitespace . t)
+ (whitespace-line-column . 80))) ;; See also [Misc #12277]
+
+ ;; (bat-mode . ((buffer-file-coding-system . utf-8-dos)))
+
+ (ruby-mode . ((ruby-indent-level . 2)))
+
+ (rdoc-mode . ((fill-column . 74)))
+
+ (yaml-mode . ((yaml-indent-offset . 2)))
+
+ (makefile-mode . ((indent-tabs-mode . t)))
+
+ (c-mode . ((c-file-style . "ruby")))
+
+ (change-log-mode .
+ ((buffer-file-coding-system . us-ascii)
+ (indent-tabs-mode . t)
+ (change-log-indent-text . 2)
+ (add-log-time-format . (lambda (&optional x y)
+ (let* ((time (or x (current-time)))
+ (system-time-locale "C")
+ (diff (+ (cadr time) 32400))
+ (lo (% diff 65536))
+ (hi (+ (car time) (/ diff 65536))))
+ (format-time-string "%a %b %e %H:%M:%S %Y" (list hi lo) t)))))))