From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.help Subject: Re: Lisp mode doc, and Lisp indentation props Date: Sun, 09 Aug 2015 21:51:11 +0100 Message-ID: <86mvy0tccg.fsf@gmail.com> References: <20150809162713.28164.01394993@ahiker.mooo.com> <86r3nctkgf.fsf@gmail.com> <20150809181249.29353.36656491@ahiker.mooo.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1439153508 3121 80.91.229.3 (9 Aug 2015 20:51:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Aug 2015 20:51:48 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Aug 09 22:51:40 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZOXZC-00087O-D5 for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Aug 2015 22:51:38 +0200 Original-Received: from localhost ([::1]:56298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOXZB-0001Yv-Mi for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Aug 2015 16:51:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOXZ2-0001Yp-94 for help-gnu-emacs@gnu.org; Sun, 09 Aug 2015 16:51:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOXYy-0000Bo-7M for help-gnu-emacs@gnu.org; Sun, 09 Aug 2015 16:51:28 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:59846) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOXYy-0000Be-02 for help-gnu-emacs@gnu.org; Sun, 09 Aug 2015 16:51:24 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZOXYv-0007rq-QR for help-gnu-emacs@gnu.org; Sun, 09 Aug 2015 22:51:21 +0200 Original-Received: from 82-69-64-228.dsl.in-addr.zen.co.uk ([82.69.64.228]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Aug 2015 22:51:21 +0200 Original-Received: from andrewjmoreton by 82-69-64-228.dsl.in-addr.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Aug 2015 22:51:21 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 82-69-64-228.dsl.in-addr.zen.co.uk User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) Cancel-Lock: sha1:dTkhIQorTbDneWlqwiCw8A2CXyY= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106421 Archived-At: On Sun 09 Aug 2015, Ian Zimmerman wrote: > On 2015-08-09 18:56 +0100, Andy Moreton wrote: > >> The declare macro can be used to add an indent property to a function >> or macro, which tells the mode how to compute required >> indentation. This is described in the Emacs Lisp manual at (info >> "(elisp) Declare Form"). > > Ok, thanks for your answer. But is there a way to _change_ this for an > already existing function or macro? That's why I asked in terms of > properties, because I'm pretty sure the declaration just results into > some proerties set on the symbol. If so, I thought I could control the > indentation by modifying those properties. I don't know the proper way to achieve this. From reading the code, it appears that this is handled by the indent property from the declare form, the value of lisp-body-indent, and the value of the lisp-indent-function property of the forms within the defun/macro being indented. See (info "(elisp) Indenting Macros") and lisp-indent-function in lisp-mode.el for the details. AndyM