forked from blastura/dot-emacs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aj-python.el
48 lines (39 loc) · 1.6 KB
/
aj-python.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
;; Python-mode
(autoload 'python-mode "python-mode" "Python Mode." t)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
(add-to-list 'interpreter-mode-alist '("python" . python-mode))
(add-hook 'python-mode-hook
(lambda ()
(set (make-variable-buffer-local 'beginning-of-defun-function)
'py-beginning-of-def-or-class)
(setq outline-regexp "def\\|class ")))
;; Eldoc mode
(add-hook 'python-mode-hook
'(lambda () (eldoc-mode 1)) t)
;; Ipython
(setq ipython-command "/usr/local/bin/ipython")
(require 'ipython)
(require 'anything-ipython)
;; (add-hook 'python-mode-hook #'(lambda ()
;; (define-key py-mode-map (kbd "M-<tab>") 'anything-ipython-complete)))
;; (add-hook 'ipython-shell-hook #'(lambda ()
;; (define-key py-mode-map (kbd "M-<tab>") 'anything-ipython-complete)))
;; If you want to use anything-show-completion.el,(facultative)
;; <http://www.emacswiki.org/cgi-bin/emacs/anything-show-completion.el>
;; add these lines:
(when (require 'anything-show-completion nil t)
(use-anything-show-completion 'anything-ipython-complete
'(length initial-pattern)))
;; pymacs
(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-exec "pymacs" nil t)
(autoload 'pymacs-load "pymacs" nil t)
;;(eval-after-load "pymacs"
;; '(add-to-list 'pymacs-load-path YOUR-PYMACS-DIRECTORY"))
;; Ropemacs
;;(require 'pymacs)
(pymacs-load "ropemacs" "rope-")
(message "aj-python loaded")
(provide 'aj-python)