Nicolas Goaziou writes:
> Kévin Le Gouguec writes:
>
>>> (I hope I got that right.)
>
> LGTM. I applied the patch on your behalf.
>
> Now Org has future-proof support for Electric indent mode.
Thanks to both of you for this welcome improvement!
--
Bastien
Kévin Le Gouguec writes:
>> (I hope I got that right.)
LGTM. I applied the patch on your behalf.
Now Org has future-proof support for Electric indent mode.
Thank you.
Kévin Le Gouguec writes:
> (I hope I got that right.)
Except I forgot the explanatory comment, and I left a typo in the
docstring. Ahem.
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 2b35535fa..caaf5ce58 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -102,6 +102,12
Nicolas Goaziou writes:
> AFAICT, `newline-and-indent' doesn't accept any argument. Keeping it
> introduces a build warning and test failures. Hence the removal.
>
> Since you were calling it with an argument I assume this may be
> a novelty in Emacs 27.
Wow, you're right. That caught me
Stefan Monnier writes:
>> +(defmacro org-test-with-minor-mode (mode state 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))
>>
> +(defmacro org-test-with-minor-mode (mode state 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
Kévin Le Gouguec writes:
> I see you've removed ARG from the call to `newline-and-indent'; I don't
> have a strong opinion about this (though I don't see a reason not to
> keep it), but I guess the docstring of `org--newline' should be changed
> to match?
AFAICT, `newline-and-indent' doesn't
Nicolas Goaziou writes:
> I fixed a typo and applied your patch.
Thank you for fixing the typo in ORG-NEWS.
I see you've removed ARG from the call to `newline-and-indent'; I don't
have a strong opinion about this (though I don't see a reason not to
keep it), but I guess the docstring of
Hello,
Kévin Le Gouguec 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 body)
> + "Run BODY after
ect: [PATCH] Make RET and C-j obey `electric-indent-mode'
* etc/ORG-NEWS: Announce the change.
* lisp/org-compat.el (org-return-indent): Deprecate this command.
* lisp/org-keys.el (org-mode-map): Rebind C-j to a command emulating
`electric-newline-and-maybe-indent'.
* lisp/org.el (org-cdlatex-environm
10 matches
Mail list logo