Re: vcl-mode for emacs

2008-03-05 Thread Stig Sandbeck Mathisen
Dag-Erling Smørgrav [EMAIL PROTECTED] writes:

 My only complaint so far is that it considers vcl_* keywords when in
 fact they are identifiers (you can define your own subs as well, not
 just override the predefined ones)

I'll need to match on something like sub ([[:alpha:]]), and use the
capture group to highlight, then.  

I don't think identifier is available as a font-lock-mode colouring,
but function is.  That may be better than keyword.

-- 
Stig Sandbeck Mathisen, Linpro
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: vcl-mode for emacs

2008-03-03 Thread Dag-Erling Smørgrav
Stig Sandbeck Mathisen [EMAIL PROTECTED] writes:
 I've created a vcl-mode for emacs.  It does indenting and syntax
 highlighting.

This is great, thanks!

My only complaint so far is that it considers vcl_* keywords when in
fact they are identifiers (you can define your own subs as well, not
just override the predefined ones)

DES
-- 
Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


vcl-mode for emacs

2008-02-18 Thread Stig Sandbeck Mathisen

I've created a vcl-mode for emacs.  It does indenting and syntax
highlighting.  

If anyone else out there is still using emacs, I'd be very happy if
you could try it out, and see if anyting is surprising, strange or
missing.  It should work with both emacs and xemacs, but I have not
tested the latter.

It's available at:

http://varnish.projects.linpro.no/browser/trunk/varnish-tools/emacs/vcl-mode.el


Installation


* Put the file vcl-mode.el somewhere in your load-path

  (C-h v load-path RET shows the contents of the load-path variable)

* Add the following line to your emacs init file, often ~/.emacs

  (require 'vcl-mode)

* Evaluate the require line with C-x C-e at the end of that line,
  or start a new emacs.

* Open a file ending in .vcl.  You should have syntaax highlighting
  and indentation with tab.

Configuration
-

The mode can be customized with M-x customize-group RET vcl RET

* Vcl Indent Level indicates the number of spaces used to indent to
  the next level.  Default 8

* Vcl Indent Tabs Mode indicates wether spaces can be replaced by
  TAB characters when indenting.  Default is nil, which means no
  tabs.

-- 
Stig Sandbeck Mathisen, Linpro
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc