lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I use this all day. Just set outline-regexp according to your function format.

(add-hook 'lua-mode-hook 'my-lua-config)

(defun my-lua-config ()
 (setq outline-regexp "function"))

I really like this simple approach instead of inserting tags "{{{" and
"}}}" to mark bodies like I've seen some people do...

and then I have global bindings like this:

(global-set-key [M-left] 'hide-body)
(global-set-key [M-right] 'show-all)
(global-set-key [M-up] 'outline-previous-heading)
(global-set-key [M-down] 'outline-next-heading)
(global-set-key [(meta return)] 'outline-toggle-entry)

HTH,
Hugo

On Thu, Aug 21, 2008 at 4:30 AM, Jim Whitehead II <jnwhiteh@gmail.com> wrote:
>
> On Thu, Aug 21, 2008 at 7:01 AM, Veli-Pekka Tätilä <vtatila@gmail.com> wrote:
> >
> > Hi,
> > A quick question:
> > Does the lua mode for Emacs allow you to use outline minor mode to hide bodies of functions? As Perl mode does I thought it would but nothing happens when I use the hide body command, oh well. I wonder if it's something quirky on this Win32 machine. I'm fairly new to Emacs but *really* like out-line minor mode and dynamic auto complete. Saves me a lot of time with a screen reader.
> >
> > So far I've yet to figure out how to read the mode docs other than the source. c-h m only gives a very brief description and then starts talking about minor modes I've got on. I'm using speechd-el in Linux and my WIn32 reader, Supernova, in Windows. Both have Emacs now.
> >
> > Any help appreciated.
> > I'm new to Emacs, I've read about it loads but only used it for a few days so far. I like it for the most part but let's not get into that.
>
> >From my recollection, it does not.  You will find that the emacs
> plugin for Lua is extremely out of date and has quite a number of
> issues with both the syntax highlighting and the indentation magic.  I
> had hoped to fix it and get a new one written at one point, but I no
> longer use emacs so I don't see that happening any time soon.
>
> - Jim