spacemacs/layers/+keyboard-layouts/bepo/config.el
syl20bnr d90c6f5fee bepo: make it more spacemacsy
Isolate the calls to bepo macro in pre-init or post-init functions, this
way they are called a the right time in the loading process.
Previously the calls were all in the config.el file which is loaded
before the package configuration phase.
2016-04-03 22:22:35 -04:00

72 lines
2.4 KiB
EmacsLisp

;;; config.el --- bepo Layer configuration File for Spacemacs
;;
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
;;
;; Author: Fabien Dubosson <fabien.dubosson@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;;------------------------------------------------------------------------------
;; PUBLIC VARIABLES
;;------------------------------------------------------------------------------
(defvar bepo-set-enabled-configurations nil
"If non nil, `bepo' will enable configurations only for the passed list of
symbols. Configurations that are also in `bepo-set-disabled-configurations' will
not be loaded.")
(defvar bepo-set-disabled-configurations nil
"If non nil, `bepo' will disable configurations for the passed list of
symbols. This list takes priority over `bepo-set-enabled-configurations', so
they will not be loaded in any case.")
;;------------------------------------------------------------------------------
;; PRIVATE VARIABLES
;;------------------------------------------------------------------------------
(defvar bepo--base-rebinding-map
'(("c" . "h")
("t" . "j")
("s" . "k")
("r" . "l")
;;
("h" . "r")
("j" . "t")
("k" . "s")
("l" . "c"))
"The base bepo's rebinding map. Dots should be read as `will
behave as'. It should be a bidirectional mapping, i.e. all
present keys should be once in each column.")
(defvar bepo--rebinding-map
(mapcan (lambda (binding)
(let ((key1 (car binding))
(key2 (cdr binding)))
(append
(list (cons (upcase key1) (upcase key2))
(cons key1 key2))
(mapcar
(lambda (modifier)
(cons (concat modifier key1) (concat modifier key2)))
'("" "C-" "M-" "C-S-")))))
bepo--base-rebinding-map)
"The full bepo's rebinding map. Dots should be read as `will behave as'.")
(with-eval-after-load 'evil
(defvar bepo--all-evil-states
(list evil-normal-state-map
evil-visual-state-map
evil-insert-state-map
evil-emacs-state-map
evil-motion-state-map)
"The list of all evil states.")
(defvar bepo--all-evil-states-but-insert
(list evil-normal-state-map
evil-visual-state-map
evil-motion-state-map)
"The list of all evil states except insert."))