From 05d759fa8b6875298395b967846d4d3c07084ee7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 28 Sep 2018 20:48:41 -0400 Subject: [PATCH] doom/window-{enlargen,zoom}: assoc -> assq A minor optimization. assq is significantly faster than assoc (not that it matters for this incredibly insignificant use-case, but yay for premature optimization!) --- core/autoload/ui.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/autoload/ui.el b/core/autoload/ui.el index 623517b62..168a5fa8f 100644 --- a/core/autoload/ui.el +++ b/core/autoload/ui.el @@ -108,7 +108,7 @@ window changes before then, the undo expires. Alternatively, use `doom/window-enlargen'." (interactive) (if (and (one-window-p) - (assoc ?_ register-alist)) + (assq ?_ register-alist)) (jump-to-register ?_) (window-configuration-to-register ?_) (delete-other-windows))) @@ -121,7 +121,7 @@ windows (unlike `doom/window-zoom') Activate again to undo." (interactive) (setq doom--window-enlargened (if (and doom--window-enlargened - (assoc ?_ register-alist)) + (assq ?_ register-alist)) (ignore (ignore-errors (jump-to-register ?_))) (window-configuration-to-register ?_) (if (window-dedicated-p)