Hi,

Mikhail Novikov delivered this patch at

https://code.launchpad.net/~freiksenet/python-mode/hide-show-support

It enables hide-show mode --hs-minor-mode-- within python-mode.

Consider to check it in.


Andreas

--
https://code.launchpad.net/s-x-emacs-werkstatt/
http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/



retrieving revision 4.55
diff -r4.55 python-mode.el
368a369,380
> (defcustom py-hide-show-keywords '("class" "def" "elif" "else" "except"
>  "for" "if" "while" "finally" "try" "with")
>   "*Keywords used by hide-show"
>   :type '(repeat string)
>   :group 'python)
> 
> (defcustom py-hide-show-hide-docstrings t
>   "*If doc strings shall be hidden"
>   :type 'boolean
>   :group 'python)
> 
> 
1218a1231,1239
> 
>   ;; Add support for HideShow
>   (add-to-list 'hs-special-modes-alist (list
>                'python-mode (concat (if py-hide-show-hide-docstrings "^\\s-*\"\"\"\\|" "") (mapconcat 'identity (mapcar #'(lambda (x) (concat "^\\s-*" x "\\>")) py-hide-show-keywords ) "\\|")) nil "#"
>                (lambda (arg)
>                  (py-goto-beyond-block)
>                  (skip-chars-backward " \t\n"))
>                nil))
>   
_______________________________________________
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode

Reply via email to