Re: Improving org-macro.el

2021-04-17 Thread Nicolas Goaziou
Hello, Stefan Monnier writes: > I just saw that it burps in Emacs-26 because of a bug when functions are > declared with 0 optional arguments like ( x). > > So I suggest the patch below, Applied. Thank you. Regards, -- Nicolas Goaziou

Re: Improving org-macro.el

2021-04-16 Thread Stefan Monnier
> I mentioned it in the ORG-NEWS file, and applied your changes. We'll see > how it goes. I just saw that it burps in Emacs-26 because of a bug when functions are declared with 0 optional arguments like ( x). So I suggest the patch below, Stefan diff --git a/lisp/org-macro.el

Re: Improving org-macro.el

2021-04-16 Thread Stefan Monnier
>> It seems to work on Org's own manual, but other than that I haven't gone >> out of my way to test it. > There were a few problems reported by the test suite that I tried to > address. I also updated `org-lint', which didn't handle macro > definitions as functions. Thanks. >> - It also changes

Re: Improving org-macro.el

2021-04-16 Thread Nicolas Goaziou
Hello, Stefan Monnier writes: > In any case, the code struck me as quite inefficient since it > reparses the macro definition every time the macro is called. Indeed. > I came up with the tentative patch below. Thank you. > It seems to work on Org's own manual, but other than that I haven't

Improving org-macro.el

2021-04-11 Thread Stefan Monnier
In the course of trying to get the Org package to work with the (then) new GNU ELPA scripts, I bumped into the org-macro.el monster (mostly because it has changed incompatibly between Emacs-26 and Emacs-27, IIRC). In any case, the code struck me as quite inefficient since it reparses the macro