diff options
| author | Aaron Jensen <aaronjensen@gmail.com> | 2018-04-08 14:13:36 -0700 |
|---|---|---|
| committer | Aaron Jensen <aaronjensen@gmail.com> | 2018-04-08 14:13:36 -0700 |
| commit | bca16be6fe6105e91f15afa78ec2314b13fc6433 (patch) | |
| tree | 38ce56f1af019d59b0f6cf71df79aaefec5c9c2f | |
| parent | fe3ae258901ba9b16e6d051427e1c0bd5e588e48 (diff) | |
Use local-variable-p instead of assq
assq uses more memory for some reason. See #1037
| -rw-r--r-- | evil-common.el | 2 | ||||
| -rw-r--r-- | 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) |
