diff options
| author | Mattias EngdegÄrd | 2020-02-01 18:07:32 +0100 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2020-02-01 22:27:23 +0100 |
| commit | 32763dac46e61cc34e8fe4d19df4905d09c1a27f (patch) | |
| tree | e7f831860af5d3a412dc3dcfbdb958fa23cbd5b3 /lisp/org | |
| parent | d07f177382b24945e1f579744702908b33605c3e (diff) | |
| download | emacs-32763dac46e61cc34e8fe4d19df4905d09c1a27f.tar.gz emacs-32763dac46e61cc34e8fe4d19df4905d09c1a27f.zip | |
Replace add-to-list to lexical variable with push (bug#39373)
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/autoinsert.el (auto-insert-alist):
* lisp/cedet/mode-local.el (mode-local-print-bindings):
* lisp/net/tramp-cache.el (tramp-flush-connection-properties)
(tramp-list-connections):
* lisp/net/zeroconf.el (zeroconf-list-service-names)
(zeroconf-list-service-types, zeroconf-list-services):
* lisp/org/org.el (org-reload):
* lisp/whitespace.el (whitespace-report-region):
* test/lisp/emacs-lisp/map-tests.el (test-map-do):
Replace add-to-list with push.
Diffstat (limited to 'lisp/org')
| -rw-r--r-- | lisp/org/org.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/org/org.el b/lisp/org/org.el index 5c8b02b9d1f..568f5b9b873 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el | |||
| @@ -18682,13 +18682,14 @@ With prefix arg UNCOMPILED, load the uncompiled versions." | |||
| 18682 | (and (string= org-dir contrib-dir) | 18682 | (and (string= org-dir contrib-dir) |
| 18683 | (org-load-noerror-mustsuffix (concat contrib-dir f))) | 18683 | (org-load-noerror-mustsuffix (concat contrib-dir f))) |
| 18684 | (and (org-load-noerror-mustsuffix (concat (org-find-library-dir f) f)) | 18684 | (and (org-load-noerror-mustsuffix (concat (org-find-library-dir f) f)) |
| 18685 | (add-to-list 'load-uncore f 'append) | 18685 | (push f load-uncore) |
| 18686 | 't) | 18686 | 't) |
| 18687 | f)) | 18687 | f)) |
| 18688 | lfeat))) | 18688 | lfeat))) |
| 18689 | (when load-uncore | 18689 | (when load-uncore |
| 18690 | (message "The following feature%s found in load-path, please check if that's correct:\n%s" | 18690 | (message "The following feature%s found in load-path, please check if that's correct:\n%s" |
| 18691 | (if (> (length load-uncore) 1) "s were" " was") load-uncore)) | 18691 | (if (> (length load-uncore) 1) "s were" " was") |
| 18692 | (reverse load-uncore))) | ||
| 18692 | (if load-misses | 18693 | (if load-misses |
| 18693 | (message "Some error occurred while reloading Org feature%s\n%s\nPlease check *Messages*!\n%s" | 18694 | (message "Some error occurred while reloading Org feature%s\n%s\nPlease check *Messages*!\n%s" |
| 18694 | (if (> (length load-misses) 1) "s" "") load-misses (org-version nil 'full)) | 18695 | (if (> (length load-misses) 1) "s" "") load-misses (org-version nil 'full)) |