[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Make RET and C-j obey `electric-indent-mode' in org-mode
From: |
Nicolas Goaziou |
Subject: |
Re: [PATCH] Make RET and C-j obey `electric-indent-mode' in org-mode |
Date: |
Thu, 07 May 2020 12:48:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hello,
Kévin Le Gouguec <address@hidden> writes:
> Here's a complete patch to make RET and C-j honor electric-indent-mode
> in org-mode, targeting Org's master branch.
Thank you very much.
I fixed a typo and applied your patch.
> +(defmacro org-test-with-minor-mode (mode state &rest body)
> + "Run BODY after setting MODE to STATE.
> +Restore MODE to its former state afterward."
> + (declare (debug (sexp sexp body)) (indent 2))
> + `(let ((old-state ,mode))
> + (,mode (if ,state 1 0))
> + ,@body
> + (,mode (if old-state 1 0))))
This is a nice macro.
However, when I have to reproduce a failing test, I don't even want to
think about the recipe and rather concentrate on the results. Hence,
I expect `should' macro's body to be self-sufficient. Therefore,
I skipped this part of the patch.
Regards,
--
Nicolas Goaziou
- Re: Reconciling org-mode idiosyncrasies with Emacs core, Kévin Le Gouguec, 2020/05/04
- Re: Reconciling org-mode idiosyncrasies with Emacs core, Nicolas Goaziou, 2020/05/04
- Re: Reconciling org-mode idiosyncrasies with Emacs core, Kévin Le Gouguec, 2020/05/04
- [PATCH] Make RET and C-j obey `electric-indent-mode' in org-mode (was: Reconciling org-mode idiosyncrasies with Emacs core), Kévin Le Gouguec, 2020/05/06
- Re: [PATCH] Make RET and C-j obey `electric-indent-mode' in org-mode,
Nicolas Goaziou <=
- Re: [PATCH] Make RET and C-j obey `electric-indent-mode' in org-mode, Kévin Le Gouguec, 2020/05/07
- Re: [PATCH] Make RET and C-j obey `electric-indent-mode' in org-mode, Nicolas Goaziou, 2020/05/07
- Re: [PATCH] Make RET and C-j obey `electric-indent-mode' in org-mode, Kévin Le Gouguec, 2020/05/07
- Re: [PATCH] Make RET and C-j obey `electric-indent-mode' in org-mode, Kévin Le Gouguec, 2020/05/07
- Re: [PATCH] Make RET and C-j obey `electric-indent-mode' in org-mode, Nicolas Goaziou, 2020/05/07
- Re: [PATCH] Make RET and C-j obey `electric-indent-mode' in org-mode, Bastien, 2020/05/24
- Re: [PATCH] Make RET and C-j obey `electric-indent-mode' in org-mode, Stefan Monnier, 2020/05/07
- Re: [PATCH] Make RET and C-j obey `electric-indent-mode' in org-mode, Kévin Le Gouguec, 2020/05/07