emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Indentation of backend definitioon
@ 2013-03-14  6:52 Carsten Dominik
  2013-03-14 22:32 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Carsten Dominik @ 2013-03-14  6:52 UTC (permalink / raw)
  To: Emacs Org mode

Hi Nicolas,

I propose the following patch to improve the automatic
indentation of the backend definition macros in ox.el.

- Carsten

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)
 
 (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)
 
 (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)
 
 (defun org-export-add-to-stack (source backend &optional process)
   "Add a new result to export stack if not present already.

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Indentation of backend definitioon
  2013-03-14  6:52 Indentation of backend definitioon Carsten Dominik
@ 2013-03-14 22:32 ` Nicolas Goaziou
  2013-03-15  6:33   ` Carsten Dominik
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2013-03-14 22:32 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Emacs Org mode

Hello,

Carsten Dominik <carsten.dominik@gmail.com> writes:

> I propose the following patch to improve the automatic
> indentation of the backend definition macros in ox.el.
>
> - Carsten
>
> 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)
>  
>  (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)
>  
>  (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)
>  
>  (defun org-export-add-to-stack (source backend &optional process)
>    "Add a new result to export stack if not present already.

Isn't it the default behaviour (see `declare' in definitions)?


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Indentation of backend definitioon
  2013-03-14 22:32 ` Nicolas Goaziou
@ 2013-03-15  6:33   ` Carsten Dominik
  0 siblings, 0 replies; 3+ messages in thread
From: Carsten Dominik @ 2013-03-15  6:33 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Emacs Org mode


On 14.3.2013, at 23:32, Nicolas Goaziou <n.goaziou@gmail.com> wrote:

> Hello,
> 
> Carsten Dominik <carsten.dominik@gmail.com> writes:
> 
>> I propose the following patch to improve the automatic
>> indentation of the backend definition macros in ox.el.
>> 
>> - Carsten
>> 
>> 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)
>> 
>> (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)
>> 
>> (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)
>> 
>> (defun org-export-add-to-stack (source backend &optional process)
>>   "Add a new result to export stack if not present already.
> 
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-15  8:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-14  6:52 Indentation of backend definitioon Carsten Dominik
2013-03-14 22:32 ` Nicolas Goaziou
2013-03-15  6:33   ` Carsten Dominik

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).