diff options
author | Mattias EngdegÄrd <mattiase@acm.org> | 2020-02-01 18:07:32 +0100 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2020-02-13 00:02:47 -0500 |
commit | 7c63da6fb9fdf9395bb6d8b4a431a208a84b618d (patch) | |
tree | 7284f55054a22edc7ad32fd6e887868e7f28631d | |
parent | 9712d1cdff57c92c7bdd4f96286a4eaa6754380e (diff) | |
download | org-mode-7c63da6fb9fdf9395bb6d8b4a431a208a84b618d.tar.gz |
Backport commit 32763dac4 from Emacs
Since 'add-to-list', being a plain function, cannot access lexical
variables, such use must be rewritten for correctness.
(Some instances actually do work thanks to a compiler macro,
but it's not something code should rely on.)
* lisp/org.el (org-reload): Replace add-to-list with push.
Replace add-to-list to lexical variable with push (bug#39373)
32763dac46e61cc34e8fe4d19df4905d09c1a27f
Mattias EngdegÄrd
Sat Feb 1 22:27:23 2020 +0100
-rw-r--r-- | lisp/org.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el index 8eb9733..df36465 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -18709,13 +18709,14 @@ With prefix arg UNCOMPILED, load the uncompiled versions." (and (string= org-dir contrib-dir) (org-load-noerror-mustsuffix (concat contrib-dir f))) (and (org-load-noerror-mustsuffix (concat (org-find-library-dir f) f)) - (add-to-list 'load-uncore f 'append) + (push f load-uncore) 't) f)) lfeat))) (when load-uncore (message "The following feature%s found in load-path, please check if that's correct:\n%s" - (if (> (length load-uncore) 1) "s were" " was") load-uncore)) + (if (> (length load-uncore) 1) "s were" " was") + (reverse load-uncore))) (if load-misses (message "Some error occurred while reloading Org feature%s\n%s\nPlease check *Messages*!\n%s" (if (> (length load-misses) 1) "s" "") load-misses (org-version nil 'full)) |