From bca16be6fe6105e91f15afa78ec2314b13fc6433 Mon Sep 17 00:00:00 2001 From: Aaron Jensen Date: Sun, 8 Apr 2018 14:13:36 -0700 Subject: Use local-variable-p instead of assq assq uses more memory for some reason. See #1037 --- evil-common.el | 2 +- evil-core.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/evil-common.el b/evil-common.el index d320fd0..381fee0 100644 --- a/evil-common.el +++ b/evil-common.el @@ -2180,7 +2180,7 @@ Variables pertaining to Transient Mark mode are listed in (when (and (boundp var) (not (assq var evil-transient-vals))) (push (list var (symbol-value var) - (and (assq var (buffer-local-variables)) t)) + (local-variable-p var)) evil-transient-vals) (make-variable-buffer-local var) (put var 'permanent-local t)))) diff --git a/evil-core.el b/evil-core.el index a62fd58..645a992 100644 --- a/evil-core.el +++ b/evil-core.el @@ -480,7 +480,7 @@ The initial value is that of `make-sparse-keymap'." (let ((mode (car entry)) (map (cdr entry))) (unless (and (keymapp (symbol-value map)) - (assq map (buffer-local-variables))) + (local-variable-p map)) (set map (make-sparse-keymap)))))) (defun evil-make-overriding-map (keymap &optional state copy) -- cgit v1.0