[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: python setup ?
From: |
Bernardo |
Subject: |
Re: python setup ? |
Date: |
Tue, 28 Apr 2009 20:43:00 +1000 |
User-agent: |
Thunderbird 2.0.0.21 (X11/20090302) |
Hello,
Can anyone help me with python code folding please? I tried:
* hs-minor-mode (doesn't work with python)
* outline mode (it does the folding part, but is really buggy with
python)
Is there a solution?
Thank you,
Sergei
hi,
which version of Emacs are you using?
i remember there was a hideshow problem introduced somewhere after v22.1
and i added this 'quick-n-dirty' hack into my .emacs
(defun bb-python-hs-helper (arg)
"Helper function for the bb-use-old-hideshow-setting below"
(python-end-of-defun)
(skip-chars-backward " \t\n"))
(defun bb-use-old-hideshow-setting ()
"Restore the hs-special-modes-alist setting that used to work fine in
v22.1.1"
(if (and (= emacs-major-version 22)
(>= emacs-minor-version 2))
(progn
(setq hs-special-modes-alist
(assq-delete-all 'python-mode hs-special-modes-alist))
(add-to-list 'hs-special-modes-alist
'(python-mode "^\\s-*def\\>" nil "#"
bb-python-hs-helper
nil)))))
(add-hook 'python-mode-hook
(lambda ()
(hs-minor-mode 1)
(bb-use-old-hideshow-setting)
;other stuff
))
this fixed the folding problem in v22.3 but may or may not help with
your issue
however, version pre-23 seems to work without this ugly hack
HTH
- Re: python setup ?, (continued)
- Re: python setup ?, Richard Riley, 2009/04/26
- Re: python setup ?, Richard Riley, 2009/04/26
- Re: python setup ?, Andreas Röhler, 2009/04/27
- Message not available
- Re: python setup ?, Richard Riley, 2009/04/27
- Re: python setup ?, Andreas Röhler, 2009/04/27
- Message not available
- Re: python setup ?, Richard Riley, 2009/04/27
- Re: python setup ?, thierry . volpiatto, 2009/04/27
- Message not available
- Re: python setup ?, Richard Riley, 2009/04/27
- Re: python setup ?, thierry . volpiatto, 2009/04/27
- Message not available
- Re: python setup ?, superbobry, 2009/04/28
- Re: python setup ?,
Bernardo <=
- Message not available
- Re: python setup ?, superbobry, 2009/04/28
- Message not available
- Re: python setup ?, Richard Riley, 2009/04/27
- Re: python setup ?, Andreas Röhler, 2009/04/27
Re: python setup ?, Xavier Maillard, 2009/04/28
Re: python setup ?, Xavier Maillard, 2009/04/28
Re: python setup ?, Xavier Maillard, 2009/04/28
Re: python setup ?, Xavier Maillard, 2009/04/28