]> git.eshelyaron.com Git - emacs.git/commitdiff
(python-mode): Add support for
authorDan Nicolaescu <dann@ics.uci.edu>
Tue, 18 Apr 2006 22:34:54 +0000 (22:34 +0000)
committerDan Nicolaescu <dann@ics.uci.edu>
Tue, 18 Apr 2006 22:34:54 +0000 (22:34 +0000)
hs-minor-mode.

lisp/ChangeLog
lisp/progmodes/python.el

index b0f52fb9ff48ae7f30499fe49e59a71cec1d65e8..3d969ed802eb443958e632b8f58b6dc18d00a827 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-18  Dan Nicolaescu  <dann@ics.uci.edu>
+
+       * progmodes/python.el (python-mode): Add support for
+       hs-minor-mode.
+
 2006-04-19  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * abbrev.el (read-abbrev-file): Use abbrev-file-name if optional
index f110828d602288c3991097cef6636cde858f1dbb..8ae94df5ea37301dd88c7d5c51d1b5a44dfa8da3 100644 (file)
@@ -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)))