From 3398a4aee71874478ec1bfdefbe7f1bed83cb05c Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Tue, 18 Apr 2006 22:34:54 +0000 Subject: [PATCH] (python-mode): Add support for hs-minor-mode. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/python.el | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b0f52fb9ff4..3d969ed802e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f110828d602..8ae94df5ea3 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1744,6 +1744,14 @@ lines count as headers. #'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))) -- 2.39.2