From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Klaus Berndl Newsgroups: gmane.emacs.help Subject: Re: pretty highlighting and indenting own elisp macros Date: 16 Oct 2002 19:08:30 +0200 Organization: sd&m AG, Muenchen, Germany Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: <3DAD9B52.9090604@ihs.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035021758 14797 80.91.224.249 (19 Oct 2002 10:02:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 19 Oct 2002 10:02:38 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 182qRI-0003qQ-00 for ; Sat, 19 Oct 2002 12:02:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 182Zch-0004ex-00; Fri, 18 Oct 2002 12:05:15 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!news-out.cwix.com!newsfeed.cwix.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!lnewspeer01.lnd.ops.eu.uu.net!emea.uu.net!news.sdm.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 41 Original-NNTP-Posting-Host: sachrang.muc.sdm.de Original-X-Trace: solti3.muc.sdm.de 1034788110 22677 193.102.181.147 (16 Oct 2002 17:08:30 GMT) Original-X-Complaints-To: usenet@news.sdm.de Original-NNTP-Posting-Date: 16 Oct 2002 17:08:30 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-Xref: shelby.stanford.edu gnu.emacs.help:106127 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2749 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2749 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