Re: More use of lexical-binding in ox.el

2021-04-28 Thread Stefan Monnier
>> Yes: >> >> (push (cons var val) varvals >> varvals))) >> >> should be >> >> (push (cons var val) varvals) >> varvals)) >> >> so that the final `varvals` is outside the `dolist` (it's the thing we >> want to return to store

Re: More use of lexical-binding in ox.el

2021-04-28 Thread Nicolas Goaziou
Hello, Stefan Monnier writes: > That's because the "buffer copy" also copies the local vars, For some reason, I misread the code and thought `buffer-file-name' and `default-directory' were explicitly ignored. Go figure. > Yes: > > (push (cons var val) varvals >

Re: More use of lexical-binding in ox.el

2021-04-27 Thread Stefan Monnier
> It looks great but it introduces a test failure, however. > > `org-export-expand-include-keyword' is called from within > `org-export-with-buffer-copy'. > > At the very beginning of `org-export-expand-include-keyword', there is > > (buffer-file-name (buffer-base-buffer)) > > Before the patch,

Re: More use of lexical-binding in ox.el

2021-04-27 Thread Nicolas Goaziou
Hello, Stefan Monnier writes: > Here's another patch to remove some more use of the old dynamically > scoped dialect of ELisp. > > Stefan > > > * lisp/ox.el: Fix various uses of the non-lexical-binding ELisp dialect. > (org-export--get-global-options,

More use of lexical-binding in ox.el

2021-04-19 Thread Stefan Monnier
Here's another patch to remove some more use of the old dynamically scoped dialect of ELisp. Stefan * lisp/ox.el: Fix various uses of the non-lexical-binding ELisp dialect. (org-export--get-global-options, org-export-insert-default-template): Use lexical-binding.