Created by Mikhail Novikov and last modified

Improved version of http://mail.python.org/pipermail/python-mode/2006-April/000353.html patch. Adds hide-show support to python.

Hiding is customizable with two custom setting variables - py-hide-show-keywords specifies keywords whose blocks you want to be hideable and with py-hide-show-hide-docstrings you can specify if you want docstrings to be hidden.

This was done as part of Tero Karvinen Linux Basics course at Haaga-Helia UAS.

Known issues:
* Considers end of docstring to be a block too as end gets matched by block head regex.

* Some versions of emacs introduced bug to hideshow that makes this work badly. Hideshow.el from emacs trunk works fine.

*Hideshowviz.el conflicts with python-mode because it implements own mod-map. To fix it comment out stuff in hideshowviz like this:

in function
(define-minor-mode hideshowvis-minor-mode ()
           ;(use-local-map hideshowvis-mode-map)
        (remove-overlays (point-min) (point-max) 'hideshowvis-hs t)

And add this line to your .emacs:

(add-hook 'hideshowvis-mode-hook (global-set-key [left-fringe mouse-1] 'hideshowvis-click-fringe))

Get this branch:
bzr branch lp:~freiksenet/python-mode/hide-show-support
Only Mikhail Novikov can upload to this branch. If you are Mikhail Novikov please log in for upload directions.

Branch merges

Related bugs

Related blueprints

Branch information

Mikhail Novikov

Recent revisions

355. By Mikhail Novikov

Fixed XEmacs bug of adding stuff too many times.

354. By Mikhail Novikov <email address hidden>

Customization possibility added.

353. By Mikhail Novikov <email address hidden>

Added support for more constructs and support for docstrings

352. By Mikhail Novikov <email address hidden>

Added hide-show support.

351. By Barry Warsaw

When shifting regions right and left, keep the region active in Emacs.

350. By Barry Warsaw

Emacs 23 has apparently changed the way transient-mark-mode works, so that we
now have to catch the 'mark-inactive signal that can occur. We really want to
say "if there's no mark, (mark) should return nil".

349. By Barry Warsaw

Post release tweaks.

348. By Barry Warsaw

Place this file under the GPLv3 and bump the version number.

347. By Barry Warsaw

None should be a pseudo keyword even though it's a keyword in Python 3.0. The
difference is that keywords must have spaces around them, but pseudo keywords
need not be surrounded by spaces.

346. By Barry Warsaw

Post-release tweaks.

Branch metadata

Branch format:
Branch format 6
Repository format:
Bazaar pack repository format 1 with rich root (needs bzr 1.0)
This branch contains Public information 
Everyone can see this information.