Mercurial > emacs
comparison lisp/progmodes/python.el @ 70103:4f0bc9ecc2a6
(python-mode): Add support for
hs-minor-mode.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Tue, 18 Apr 2006 22:34:54 +0000 |
parents | dc49655f57ae |
children | 15278e681be3 |
comparison
equal
deleted
inserted
replaced
70102:2ae2af972533 | 70103:4f0bc9ecc2a6 |
---|---|
1742 (setq imenu-create-index-function #'python-imenu-create-index) | 1742 (setq imenu-create-index-function #'python-imenu-create-index) |
1743 (set (make-local-variable 'eldoc-documentation-function) | 1743 (set (make-local-variable 'eldoc-documentation-function) |
1744 #'python-eldoc-function) | 1744 #'python-eldoc-function) |
1745 (add-hook 'eldoc-mode-hook | 1745 (add-hook 'eldoc-mode-hook |
1746 '(lambda () (run-python nil t)) nil t) ; need it running | 1746 '(lambda () (run-python nil t)) nil t) ; need it running |
1747 (unless (assoc 'pyhon-mode hs-special-modes-alist) | |
1748 (setq | |
1749 hs-special-modes-alist | |
1750 (cons (list | |
1751 'python-mode "^\\s-*def\\>" nil "#" | |
1752 (lambda (arg)(python-end-of-defun)(skip-chars-backward " \t\n")) | |
1753 nil) | |
1754 hs-special-modes-alist))) | |
1747 (if (featurep 'hippie-exp) | 1755 (if (featurep 'hippie-exp) |
1748 (set (make-local-variable 'hippie-expand-try-functions-list) | 1756 (set (make-local-variable 'hippie-expand-try-functions-list) |
1749 (cons 'python-try-complete hippie-expand-try-functions-list))) | 1757 (cons 'python-try-complete hippie-expand-try-functions-list))) |
1750 (unless font-lock-mode (font-lock-mode 1)) | 1758 (unless font-lock-mode (font-lock-mode 1)) |
1751 (when python-guess-indent (python-guess-indent)) | 1759 (when python-guess-indent (python-guess-indent)) |