Hello, Kévin Le Gouguec <kevin.legoug...@gmail.com> 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