[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pretty highlighting and indenting own elisp macros
From: |
Klaus Berndl |
Subject: |
Re: pretty highlighting and indenting own elisp macros |
Date: |
16 Oct 2002 19:08:30 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
On Wed, 16 Oct 2002, Kevin Rodgers wrote:
> Klaus Berndl wrote:
>
> > If i add a call to `with-temp-file' in my elisp-program it will be
> > highlighted with font-lock-keyword-face and indented like follows:
> > (with-temp-file "my-filename"
> > (foo ...)
> > (bar ...))
> > Fine. But suppose i have written my own macro `with-XYZ':
> > (defmacro with-XYZ (arg &rest body)
> > ....)
> > If i add this macro to my elisp-program then it is not highlighted
> > as keyword
> > and it is poorly indented:
> > (with-XYZ "my-first-arg"
> > (first-form-of-body ..)
> > ...)
> > What must i do so my own macros are highlighted and indented as
> > build-in macros
> > like `with-temp-file'? The former one seems to be not so hard but for the
> > second one i have no glue.
>
> ;;; Local Variables:
> ;;; eval: (put 'with-XYZ 'lisp-indent-hook 1)
> ;;; End:
Ahh, nice...but where can i find such tricks in the documentation?
I have search all the elisp-info files and haven't found *lisp-indent-hook*.
Thanks a lot!
Klaus
--
Klaus Berndl mailto: klaus.berndl@sdm.de
sd&m AG http://www.sdm.de
software design & management
Thomas-Dehler-Str. 27, 81737 München, Germany
Tel +49 89 63812-392, Fax -220