comparison .emacs @ 280:c738405d0d6c

mkdir -p
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 02 May 2013 11:21:30 -0700
parents 7ffc6b1821f8
children 618db1b1f34b
comparison
equal deleted inserted replaced
279:19070b2af257 280:c738405d0d6c
1 ;; emacs server (what a piece of crap)
1 (require 'server) 2 (require 'server)
2 (or (server-running-p) 3 (or (server-running-p)
3 (server-start)) 4 (server-start))
4 (if (boundp 'tool-bar-mode) (tool-bar-mode 0)) 5 (if (boundp 'tool-bar-mode) (tool-bar-mode 0))
5 (setq inhibit-startup-message t) 6 (setq inhibit-startup-message t)
6 (setq make-backup-files nil) 7 (setq make-backup-files nil)
7 (put 'downcase-region 'disabled nil) 8 (put 'downcase-region 'disabled nil)
8 (setq truncate-lines nil) 9 (setq truncate-lines nil)
9 (setq truncate-partial-width-windows nil) 10 (setq truncate-partial-width-windows nil)
10 (setq use-file-dialog nil) 11 (setq use-file-dialog nil)
12
13 ;; make directories when they don't exist
14 ;; from http://stackoverflow.com/questions/6830671/how-to-make-emacs-create-intermediate-dirs-when-saving-a-file
15 (add-hook 'before-save-hook
16 (lambda ()
17 (when buffer-file-name
18 (let ((dir (file-name-directory buffer-file-name)))
19 (when (not (file-exists-p dir))
20 (make-directory dir t))))))
11 21
12 ;; indentation 22 ;; indentation
13 23
14 ;; python indentation 24 ;; python indentation
15 (setq python-indent 4) 25 (setq python-indent 4)