Source

dotfiles / emacs.d / mspython.el

Diff from to

emacs.d/mspython.el

-;; Advanced Python stuff
-;; Pymacs
-;(require 'pymacs)
-;(autoload 'pymacs "pymacs" nil t)
-;(autoload 'pymacs-load "pymacs" nil t)
-;(autoload 'pymacs-eval "pymacs" nil t)
-;(autoload 'pymacs-apply "pymacs")
-;(autoload 'pymacs-call "pymacs")
-
-;; python-mode:
-;(setq load-path (cons "/usr/share/emacs/site-lisp" load-path))
-;(autoload 'python-mode "python-mode" "Python editing mode." t)
-;(setq auto-mode-alist
-;      (cons '("\\.py$" . python-mode) auto-mode-alist))
-
-;; Bicycle Repair - Python Refactoring
-;(pymacs-load "bikeemacs" "brm-")
-;(brm-init)
-
-;;; Get python documentation 
-;; get help on a symbol: C-c C-f
-;(add-hook 'python-mode-hook
-;          '(lambda () (eldoc-mode 1)) t)
-
+;;; My python configuration
+;;
+;; Highlights
+;; + Pyflakes
+;; + Support for syntax highlighting in common files like tap, tac, tml, yaml
+;; + Pymacs + Rope for Refactoring, Completion, Help at Point, etc
+;;  *
+;;  *
 
 ;; PYTHON MODE FOR TWISTED
 (add-to-list 'auto-mode-alist '("\\.tap\\'" . python-mode))
 (add-to-list 'auto-mode-alist '("\\.tac\\'" . python-mode))
 (add-to-list 'auto-mode-alist '("\\.tml\\'" . python-mode))
 
-;; Pyflakes and Flymake for Python!  WHOOO!
-; (defun py-pychecker-run ()
-;  (interactive)
-;    (shell-command (concat
-;                    "pyflakes "
-;                    (buffer-file-name))
-;                   "*compilation*")
-;    (switch-to-buffer-other-window "*compilation*"))
-
+;; PYFLAKES
 ;; configure hooks to run pyflakes automatically with flymake mode:
 ;; NOTE: this is super sweet
 (when (load "flymake" t)
   (delete '("\\.xml?\\'" flymake-xml-init) flymake-allowed-file-name-masks)
   (add-to-list 'flymake-allowed-file-name-masks
                '("\\.py\\'" flymake-pyflakes-init)))
-;; 
+;;
 (add-hook 'find-file-hook 'flymake-find-file-hook)
 
 ;; run pyflakes(instead of pychecker) manually with C-c C-w:
 
 
 ;; MS TEST
+;; TODO: Probably shouldn't be python specific:
 (require 'mstest)
 
 ;; YAML mode:
 (add-to-list 'auto-mode-alist '("\\.jinja2\\'" . nxml-mode))
 ;;(add-to-list 'auto-mode-alist '("\\.jsp\\'" . jsp-mode))
 
+;; Pymacs
+;;  Provides elisp to python bridge allowing you to call elisp from
+;;  python and vice versa.  Also enables extensions to Emacs through
+;;  Python code.
+;;
+;;  see ~/etc/setup_pymacs.sh
+;; (require 'pymacs)
+;; (autoload 'pymacs "pymacs" nil t)
+;; (autoload 'pymacs-load "pymacs" nil t)
+;; (autoload 'pymacs-eval "pymacs" nil t)
+;; (autoload 'pymacs-apply "pymacs")
+;; (autoload 'pymacs-call "pymacs")
+
+;; Rope and RopeEmacs
+;;
+;; Refactoring and Autocompletion
+;;
+;; Although I'm only using Rope for Python it is
+;; a general library and can be used with other languages.
+;;
+;; set ~/etc/setup_rope.sh
+;;(pymacs-load "ropemacs" "rope-")
+