[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to let hs-minor-mode hide a block ended by "end"?
From: |
tsongchong |
Subject: |
Re: how to let hs-minor-mode hide a block ended by "end"? |
Date: |
25 Sep 2006 00:28:55 -0700 |
User-agent: |
G2/1.0 |
I've tried this in my .emacs:
(add-to-list 'hs-special-modes-alist '(lua-mode "do" "end" nil nil
nil))
to handle blocks without nest, but again, nothing happened when "Hide
Block" was pressed
I'm a emacs-lisp newbie. Is there anything wrong with the add-to-list ?
thanks and regards,
Tsong Chong
David Hansen wrote:
> On 24 Sep 2006 02:09:03 -0700 tsongchong@gmail.com wrote:
>
> > Hi,
> >
> > I'm using LUA programming language, which begins a code block with "do"
> > and ends it with "end"
> >
> > It seems that, by default, hs-minor-mode can only hide code blocks
> > surrounded by braces "{}" or like.
> >
> > how can i make it to hide code between "do" and "end"?
>
> C-h v hs-special-modes-alist RET
>
> You'll have to write a `FORWARD-SEXP-FUNC' that takes care of
> nested blocks.
>
> David