Skip to content

Instantly share code, notes, and snippets.

@eskil
Created May 18, 2012 20:07
Show Gist options
  • Save eskil/2727344 to your computer and use it in GitHub Desktop.
Save eskil/2727344 to your computer and use it in GitHub Desktop.
Emacs config to use the right tabs for yelp codes...
(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