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.
This commit is contained in:
Henrik Lissner 2020-07-30 18:57:53 -04:00
parent 66e9b0afc8
commit 092480152e
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -48,6 +48,12 @@
(setq file-name-handler-alist doom--initial-file-name-handler-alist)) (setq file-name-handler-alist doom--initial-file-name-handler-alist))
(add-hook 'emacs-startup-hook #'doom-reset-file-handler-alist-h)) (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 ;; Just the bare necessities
(require 'subr-x) (require 'subr-x)
(require 'cl-lib) (require 'cl-lib)