-
Notifications
You must be signed in to change notification settings - Fork 2
/
environment.el
49 lines (36 loc) · 1.68 KB
/
environment.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
;; fix the PATH variable
(defun set-exec-path-from-shell-PATH ()
(let ((path-from-shell (shell-command-to-string "$SHELL -i -c 'echo $PATH'")))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-from-shell path-separator))))
(if window-system (set-exec-path-from-shell-PATH))
;; emacs configuration directory based on this file's location
(setq emacs-dir (file-name-directory
(or (buffer-file-name) load-file-name)))
(add-to-list 'load-path (concat emacs-dir "/vendor"))
;; set up emacs shitty customizations UI
(setq custom-file "~/.emacs.d/custom.el")
(load-file "~/.emacs.d/custom.el")
(setq mac-option-modifier 'super)
(setq mac-command-modifier 'meta)
;; save backup files to /tmp
(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))
;; respek c42 dotfiles, which are dotless
(add-to-list 'auto-mode-alist '("zshrc" . sh-mode))
(add-to-list 'auto-mode-alist '("bashrc" . sh-mode))
;; Rake files are ruby, too, as are gemspecs, rackup files, etc.
(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.thor$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.gemspec$" . ruby-mode))
(add-to-list 'auto-mode-alist '("\\.ru$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Rakefile$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Thorfile$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Gemfile$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Capfile$" . ruby-mode))
(add-to-list 'auto-mode-alist '("Vagrantfile$" . ruby-mode))
;; turn off that fucking box
(setq ring-bell-function 'ignore)
(provide 'environment)