From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Lisp indentation. Date: Thu, 10 Mar 2005 14:43:34 -0500 Message-ID: References: <87mztbmk6r.fsf@xs4all.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1110484150 11896 80.91.229.2 (10 Mar 2005 19:49:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 10 Mar 2005 19:49:10 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 10 20:49:08 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D9TeB-0001sG-Qt for ged-emacs-devel@m.gmane.org; Thu, 10 Mar 2005 20:48:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D9Tt7-0004oZ-M5 for ged-emacs-devel@m.gmane.org; Thu, 10 Mar 2005 15:04:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D9Ts7-0004TH-1B for emacs-devel@gnu.org; Thu, 10 Mar 2005 15:03:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D9Ts3-0004Rc-Cz for emacs-devel@gnu.org; Thu, 10 Mar 2005 15:03:02 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D9Ts3-0004QK-9f for emacs-devel@gnu.org; Thu, 10 Mar 2005 15:02:59 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D9TaE-0000mC-Ap for emacs-devel@gnu.org; Thu, 10 Mar 2005 14:44:44 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id D7311340017; Thu, 10 Mar 2005 14:43:38 -0500 (EST) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id C48F34AC257; Thu, 10 Mar 2005 14:43:34 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id AB8C14BD56; Thu, 10 Mar 2005 14:43:34 -0500 (EST) Original-To: Lute Kamstra In-Reply-To: <87mztbmk6r.fsf@xs4all.nl> (Lute Kamstra's message of "Thu, 10 Mar 2005 19:26:20 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-4.82, requis 5, autolearn=not spam, AWL 0.08, BAYES_00 -4.90) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34431 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34431 > In about 25% of the cases the lisp-indent-hook property is used to > specify the desired indentation and in the remaining 75% of the cases, > the lisp-indent-function property is used. Is the second preferred? > (The docsting of the function lisp-indent-function suggest this.) > Should occurrences of lisp-indent-hook be renamed to > lisp-indent-function? Yes, although there is no urgency. > In most cases the indentation property is put on the symbol at the > place the symbol is defined. Symbols that are defined in C get their > indentation property in lisp/emacs-lisp/lisp-mode.el. There are > however a few symbols that are defined in lisp elsewhere that get > their lisp-indent-function property set in lisp-mode.el. For example > save-selected-window, save-match-data, and with-current-buffer. Is > there some policy wrt the place where the indentation property should > be set? I'd say they should be set in the `declare' part of the definition of the macro. See the definition of `when' or `unless' for examples. Unless it's common to edit code that uses the macro while the macro itself is not loaded, in which case it might be worthwhile to put the `put' in some other file like lisp-mode.el. Stefan