From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Indentation of backend definitioon Date: Fri, 15 Mar 2013 07:33:34 +0100 Message-ID: <2B6D8013-5309-496A-B569-5DB617509528@gmail.com> References: <87mwu5bojt.fsf@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 6.2 \(1499\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39484) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGPga-00030l-TB for emacs-orgmode@gnu.org; Fri, 15 Mar 2013 04:08:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGPgX-0003LC-Tz for emacs-orgmode@gnu.org; Fri, 15 Mar 2013 04:08:20 -0400 Received: from mail-we0-x236.google.com ([2a00:1450:400c:c03::236]:53864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGPgX-0003Kp-O7 for emacs-orgmode@gnu.org; Fri, 15 Mar 2013 04:08:17 -0400 Received: by mail-we0-f182.google.com with SMTP id t57so2975747wey.27 for ; Fri, 15 Mar 2013 01:08:15 -0700 (PDT) In-Reply-To: <87mwu5bojt.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: Emacs Org mode On 14.3.2013, at 23:32, Nicolas Goaziou wrote: > Hello, >=20 > Carsten Dominik writes: >=20 >> I propose the following patch to improve the automatic >> indentation of the backend definition macros in ox.el. >>=20 >> - Carsten >>=20 >> diff --git a/lisp/ox.el b/lisp/ox.el >> index c5b6d7c..31983b2 100644 >> --- a/lisp/ox.el >> +++ b/lisp/ox.el >> @@ -987,6 +987,7 @@ keywords are understood: >> ',export-block)) >> ;; Splice in the body, if any. >> ,@body))) >> +(put 'org-export-define-backend 'lisp-indent-function 1) >>=20 >> (defmacro org-export-define-derived-backend (child parent &rest body) >> "Create a new back-end as a variant of an existing one. >> @@ -1078,6 +1079,7 @@ The back-end could then be called with, for = example: >> ',export-block)) >> ;; Splice in the body, if any. >> ,@body))) >> +(put 'org-export-define-derived-backend 'lisp-indent-function 2) >>=20 >> (defun org-export-backend-parent (backend) >> "Return back-end from which BACKEND is derived, or nil." >> @@ -5201,6 +5203,7 @@ and >> (message "Process '%s' exited abnormally" p)) >> (unless org-export-async-debug >> (delete-file ,,temp-file))))))))))))) >> +(put 'org-export-async-start 'lisp-indent-function 1) >>=20 >> (defun org-export-add-to-stack (source backend &optional process) >> "Add a new result to export stack if not present already. >=20 > Isn't it the default behaviour (see `declare' in definitions)? Indeed, apparently I had not loaded ox.el when I tried to reindent some = code, and I am not used to using and seeing the declare form. Sorry for = the noise. - Carsten