[Python-mode] [patch] add support for hideshow.el
Dan Nicolaescu
dann at ics.uci.edu
Wed Apr 26 18:25:00 CEST 2006
This patch adds support for hideshow.el
Please apply it.
--- python-mode.el.orig 2006-04-26 09:22:28.000000000 -0700
+++ python-mode.el 2006-04-26 09:23:03.000000000 -0700
@@ -1211,6 +1211,14 @@
(if (fboundp 'imenu-add-to-menubar)
(imenu-add-to-menubar (format "%s-%s" "IM" mode-name)))
)
+ (unless (assoc 'pyhon-mode hs-special-modes-alist)
+ (setq hs-special-modes-alist
+ (cons (list
+ 'python-mode "^\\s-*def\\>" nil "#"
+ (lambda (arg)
+ (py-end-of-def-or-class)
+ (skip-chars-backward " \t\n"))
+ nil) hs-special-modes-alist)))
;; Run the mode hook. Note that py-mode-hook is deprecated.
(if python-mode-hook
(run-hooks 'python-mode-hook)
More information about the Python-mode
mailing list