From 092480152e2ad9c70b60c4aa89d87af02da9f997 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 30 Jul 2020 18:57:53 -0400 Subject: [PATCH] Fix #3650: void-variable tab-prefix-map Seems like some OSes' package managers are serving up a build of Emacs where it doesn't define `tab-prefix-map`, but uses it (or another package uses it--honestly, it difficult to tell. I can't reproduce this, but I've gotten reports of it on Arch and Ubuntu). It'll likely go away on its own, so I'll remove this after a year or something. --- core/core.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/core.el b/core/core.el index c34e586c4..a402ff3c8 100644 --- a/core/core.el +++ b/core/core.el @@ -48,6 +48,12 @@ (setq file-name-handler-alist doom--initial-file-name-handler-alist)) (add-hook 'emacs-startup-hook #'doom-reset-file-handler-alist-h)) +;; REVIEW Fixes 'void-variable tab-prefix-map' errors caused by packages that +;; prematurely use this variable before it was introduced. Remove this in +;; a year. +(unless (boundp 'tab-prefix-map) + (defvar tab-prefix-map (make-sparse-keymap))) + ;; Just the bare necessities (require 'subr-x) (require 'cl-lib)