all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* how to let hs-minor-mode hide a block ended by "end"?
@ 2006-09-24  9:09 tsongchong
  2006-09-24 10:59 ` David Hansen
       [not found] ` <mailman.7308.1159096114.9609.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 3+ messages in thread
From: tsongchong @ 2006-09-24  9:09 UTC (permalink / raw)


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"?

thanks and regards,

Tsong Chong

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to let hs-minor-mode hide a block ended by "end"?
  2006-09-24  9:09 how to let hs-minor-mode hide a block ended by "end"? tsongchong
@ 2006-09-24 10:59 ` David Hansen
       [not found] ` <mailman.7308.1159096114.9609.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 3+ messages in thread
From: David Hansen @ 2006-09-24 10:59 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to let hs-minor-mode hide a block ended by "end"?
       [not found] ` <mailman.7308.1159096114.9609.help-gnu-emacs@gnu.org>
@ 2006-09-25  7:28   ` tsongchong
  0 siblings, 0 replies; 3+ messages in thread
From: tsongchong @ 2006-09-25  7:28 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-25  7:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-24  9:09 how to let hs-minor-mode hide a block ended by "end"? tsongchong
2006-09-24 10:59 ` David Hansen
     [not found] ` <mailman.7308.1159096114.9609.help-gnu-emacs@gnu.org>
2006-09-25  7:28   ` tsongchong

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.