summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2019-10-08 22:02:21 +0200
committerJonas Bernoulli <jonas@bernoul.li>2019-10-08 22:02:21 +0200
commit19ebf53f44532b5c31aaa5b6870fbc567e6889a4 (patch)
tree28622925267ff0b182ea98a8a4794873b3086642
parent45c29f9bfb7f2df93426ce1571e2f4f41ed4e492 (diff)
Handle async-bytecomp-allowed-packages properly
Previously the value of `async-bytecomp-allowed-packages' always was a list packages and the special symbol `all'. We failed to handle `all'. Now the value can also be one of the atoms `t' and `all'. Adjust our related code to handle all valid values. Re https://github.com/jwiegley/emacs-async/pull/113. Re https://github.com/magit/magit/pull/3981.
-rw-r--r--with-editor.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/with-editor.el b/with-editor.el
index 398e293..5d25f89 100644
--- a/with-editor.el
+++ b/with-editor.el
@@ -86,7 +86,10 @@
(require 'shell)
(and (require 'async-bytecomp nil t)
- (memq 'magit (bound-and-true-p async-bytecomp-allowed-packages))
+ (let ((pkgs (bound-and-true-p async-bytecomp-allowed-packages)))
+ (if (consp pkgs)
+ (cl-intersection '(all magit) pkgs)
+ (memq pkgs '(all t))))
(fboundp 'async-bytecomp-package-mode)
(async-bytecomp-package-mode 1))