34 lines
500 B
EmacsLisp
34 lines
500 B
EmacsLisp
|
(custom-set-variables
|
||
|
'(python-indent 4))
|
||
|
|
||
|
(defun python-mode-setup ()
|
||
|
|
||
|
;; ------------- ;;
|
||
|
;; CONFIGURATION ;;
|
||
|
;; ------------- ;;
|
||
|
|
||
|
;; Comment boxing style
|
||
|
(set 'my-rebox-style 423)
|
||
|
|
||
|
;; -------- ;;
|
||
|
;; BINDINGS ;;
|
||
|
;; -------- ;;
|
||
|
|
||
|
;; comment
|
||
|
(define-key
|
||
|
py-mode-map
|
||
|
[(control c) (control c)]
|
||
|
'comment-region)
|
||
|
|
||
|
;; rebox
|
||
|
(define-key
|
||
|
py-mode-map
|
||
|
[(meta q)]
|
||
|
'my-rebox-comment)
|
||
|
|
||
|
)
|
||
|
|
||
|
(add-hook 'python-mode-hook 'python-mode-setup)
|
||
|
|
||
|
(provide 'my-python-mode)
|