# HG changeset patch # User Dan Nicolaescu # Date 1145399694 0 # Node ID 4f0bc9ecc2a6e3bf6d22bb5f6a2220e945935625 # Parent 2ae2af9725335e7c4f28f6728fcd008053cd000e (python-mode): Add support for hs-minor-mode. diff -r 2ae2af972533 -r 4f0bc9ecc2a6 lisp/ChangeLog --- a/lisp/ChangeLog Tue Apr 18 22:04:27 2006 +0000 +++ b/lisp/ChangeLog Tue Apr 18 22:34:54 2006 +0000 @@ -1,3 +1,8 @@ +2006-04-18 Dan Nicolaescu + + * progmodes/python.el (python-mode): Add support for + hs-minor-mode. + 2006-04-19 Reiner Steib * abbrev.el (read-abbrev-file): Use abbrev-file-name if optional diff -r 2ae2af972533 -r 4f0bc9ecc2a6 lisp/progmodes/python.el --- a/lisp/progmodes/python.el Tue Apr 18 22:04:27 2006 +0000 +++ b/lisp/progmodes/python.el Tue Apr 18 22:34:54 2006 +0000 @@ -1744,6 +1744,14 @@ #'python-eldoc-function) (add-hook 'eldoc-mode-hook '(lambda () (run-python nil t)) nil t) ; need it running + (unless (assoc 'pyhon-mode hs-special-modes-alist) + (setq + hs-special-modes-alist + (cons (list + 'python-mode "^\\s-*def\\>" nil "#" + (lambda (arg)(python-end-of-defun)(skip-chars-backward " \t\n")) + nil) + hs-special-modes-alist))) (if (featurep 'hippie-exp) (set (make-local-variable 'hippie-expand-try-functions-list) (cons 'python-try-complete hippie-expand-try-functions-list)))