;;; +key.el --- minor mode for keymaps -*- lexical-binding: t; -*-
;;; Commentary:
;; Much of the code here was cribbed from https://emacs.stackexchange.com/a/358,
;; which in turn was cribbed in part from
;; https://github.com/kaushalmodi/.emacs.d/blob/master/elisp/modi-mode.el,
;; https://github.com/jwiegley/use-package/blob/master/bind-key.el and
;; elsewhere.
;; The basic idea is to have a minor-mode for my personal key customizations,
;; especially a "leader key" set up à la vim. In Emacs, I use `C-z' for this
;; leader key, because of its easy location and relative uselessness by default.
;;; Code:
(require 'easy-mmode)
(require 'setup nil t)
;; I need to define this map before the proper mode map.
(defvar +key-leader-map (let ((map (make-sparse-keymap))
(c-z (global-key-binding "\C-z")))
(define-key map "\C-z" c-z)
map)
"A leader keymap under the \"C-z\" bind.")
;; http://xahlee.info/emacs/emacs/emacs_menu_app_keys.html and
(defvar +key-menu-map (let ((map (make-sparse-keymap)))
(define-key map (kbd "