Created
May 18, 2012 20:07
-
-
Save eskil/2727344 to your computer and use it in GitHub Desktop.
Emacs config to use the right tabs for yelp codes...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-yelp-python-mode-hook () | |
(setq tab-width 4) | |
(setq py-indent-offset 4) | |
(setq indent-tabs-mode (or (string-match "/pg/yelp-main/" (buffer-file-name)) | |
(string-match "/pg/yelp_conn/" (buffer-file-name)) | |
(string-match "/pg/yelp_lib/" (buffer-file-name)) | |
(and (string-match "/pg/services/" (buffer-file-name)) | |
(not (or (string-match "/zygote/" (buffer-file-name)) | |
(string-match "/google/" (buffer-file-name)) | |
) | |
) | |
) | |
)) | |
(setq py-smart-indentation nil) | |
(setq python-indent 4) | |
(add-hook 'before-save-hook 'delete-trailing-whitespace) | |
(outline-python) | |
(message "yelp python mode, tabs is %s" indent-tabs-mode) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment