From: Stefan Bund Date: Mon, 12 Mar 2012 15:54:45 +0000 (+0100) Subject: python setup README and adjustments X-Git-Url: http://g0dil.de/git?p=emacs-init.git;a=commitdiff_plain;h=e65c852bf3affe8d97a5d1122e5a44ff2baf2cc7 python setup README and adjustments --- diff --git a/python/README b/python/README new file mode 100644 index 0000000..3250987 --- /dev/null +++ b/python/README @@ -0,0 +1,13 @@ + +See http://hide1713.wordpress.com/2009/01/30/setup-perfect-python-environment-in-emacs/ + +Install the following packages: + + yasnippet + pymacs + python-rope + python-ropemacs + pyflakes + +then load 'setup.el' from your emacs startup. The current Version has +lots of stuff disabled. diff --git a/python/init_python.el b/python/init_python.el index 38131c7..b238fcf 100644 --- a/python/init_python.el +++ b/python/init_python.el @@ -10,7 +10,7 @@ (define-key py-mode-map (kbd "RET") 'newline-and-indent) ;(define-key py-mode-map [tab] 'yas/expand) ;(setq yas/after-exit-snippet-hook 'indent-according-to-mode) - (smart-operator-mode-on) + ;(smart-operator-mode-on) )) ;; pymacs (autoload 'pymacs-apply "pymacs") @@ -192,5 +192,3 @@ is ignored (Those are the file local variables and local words)." (flyspell-mode t)) (provide 'init_python) - - diff --git a/python/setup.el b/python/setup.el new file mode 100644 index 0000000..f325608 --- /dev/null +++ b/python/setup.el @@ -0,0 +1,7 @@ +(let ((self-dir (file-name-directory (or load-file-name + (when (boundp 'bytecomp-filename) bytecomp-filename) + buffer-file-name)))) + (add-to-list 'load-path self-dir)) + +(load-library "auto-completion") +(require 'init_python) diff --git a/setup/magit.el b/setup/magit.el index 1c2b2f0..c4405bb 100644 --- a/setup/magit.el +++ b/setup/magit.el @@ -1,27 +1,32 @@ (add-to-list 'load-path "~/.emacs.d/magit") (require 'magit) -(require 'advice) (require 'cl) -(setf (symbol-function 'builtin-process-file) (symbol-function 'process-file)) +(when (eq system-type 'windows-nt) -(defvar my-magit-shell "c:\\Program Files (x86)\\Git\\bin\\sh") + (require 'advice) -(defun my-magit-process-file (program &optional infile buffer display &rest args) - (builtin-process-file my-magit-shell infile buffer display - "-c" (mapconcat 'shell-quote-argument (cons "/bin/git" args) " "))) + (setf (symbol-function 'builtin-process-file) (symbol-function 'process-file)) -(defadvice magit-cmd-output (around my-magit-process-file activate) - (letf (((symbol-function 'process-file) (symbol-function 'my-magit-process-file))) - ad-do-it)) + (defvar my-magit-shell "c:\\Program Files (x86)\\Git\\bin\\sh") -(defadvice magit-git-exit-code (around my-magit-process-file activate) - (letf (((symbol-function 'process-file) (symbol-function 'my-magit-process-file))) - ad-do-it)) + (defun my-magit-process-file (program &optional infile buffer display &rest args) + (builtin-process-file my-magit-shell infile buffer display + "-c" (mapconcat 'shell-quote-argument (cons "/bin/git" args) " "))) -(defadvice magit-run (around activate) - (letf (((symbol-function 'process-file) (symbol-function 'my-magit-process-file))) - ad-do-it)) + (defadvice magit-cmd-output (around my-magit-process-file activate) + (letf (((symbol-function 'process-file) (symbol-function 'my-magit-process-file))) + ad-do-it)) + + (defadvice magit-git-exit-code (around my-magit-process-file activate) + (letf (((symbol-function 'process-file) (symbol-function 'my-magit-process-file))) + ad-do-it)) + + (defadvice magit-run (around activate) + (letf (((symbol-function 'process-file) (symbol-function 'my-magit-process-file))) + ad-do-it)) + +); End Windows-NT (global-set-key "\C-cGS" 'magit-status) @@ -59,6 +64,6 @@ (if (not dir) (error "No git repository")) (if arg (setq symbol (read-string "Symbol: " nil nil symbol))) (let ((default-directory dir)) - (grep (format "git ls-files -z | xargs -r0 grep -nHF %s | cat -" symbol))))) + (grep (format "git ls-files -z | xargs -r0 grep -nwHF %s | cat -" symbol))))) (global-set-key "\C-cGF" 'git-files-find-symbol)