diff options
| author | Philip Kaludercic <philipk@posteo.net> | 2022-12-15 23:03:31 +0100 |
|---|---|---|
| committer | Philip Kaludercic <philipk@posteo.net> | 2022-12-15 23:03:31 +0100 |
| commit | c0d5634570d65bce07c8fb60e5b29106c379fc43 (patch) | |
| tree | 29ac0ba88baf7af07d8e24da4f661514d40f9fc8 /compat.el | |
| parent | 043e3d71b5c876b028a39afd6796a2aa9b694b65 (diff) | |
Simplify loading procedure
Instead of modifying the name of the file we pass to 'load', we modify
the order of contents in 'load-suffixes' and ensure that .el files are
preferred over .elc files, thus preventing that the macro-expanded
files are used, which prevents definitions form being loaded.
Diffstat (limited to 'compat.el')
| -rw-r--r-- | compat.el | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -47,12 +47,10 @@ ;; the file (which is disabled by `compat--inhibit-prefixed', so ;; that the file can be loaded again at some later point when the ;; prefixed definitions are needed). - (dolist (vers '(24 25 26 27 28 29)) - (unless (memq (intern (format "compat-%d" vers)) features) - (load (format "compat-%d%s" vers - (if (bound-and-true-p compat-testing) - ".el" "")) - nil t)))) + (dolist (version '(24 25 26 27 28 29)) + (let ((feature-name (format "compat-%d" version))) + (unless (memq (intern feature-name) features) + (load feature-name nil t))))) (provide 'compat) ;;; compat.el ends here |
