help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: pretty highlighting and indenting own elisp macros


From: Kevin Rodgers
Subject: Re: pretty highlighting and indenting own elisp macros
Date: Wed, 16 Oct 2002 11:01:06 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

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:

--
<a href="mailto:&lt;kevinr&#64;ihs.com&gt;";>Kevin Rodgers</a>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]