core: remove dash and f from boostrap and attempt to remove evil

Cannot remove evil due to bind-map requiring it.
This commit is contained in:
syl20bnr 2015-12-20 23:00:09 -05:00
parent 49cb5b3510
commit a5022743e5
4 changed files with 32 additions and 35 deletions

View File

@ -86,11 +86,15 @@
(setq initial-buffer-choice (lambda () (get-buffer spacemacs-buffer-name)))
;; mandatory dependencies
;; dash is required to prevent a package.el bug with f on 24.3.1
(spacemacs/load-or-install-protected-package 'dash t)
(spacemacs/load-or-install-protected-package 's t)
;; (spacemacs/load-or-install-protected-package 'dash t)
;; (spacemacs/load-or-install-protected-package 's t)
;; evil is required by bind-map
(spacemacs/load-or-install-protected-package 'evil t)
(spacemacs/load-or-install-protected-package 'bind-map t)
;; bind-key is required by use-package
(spacemacs/load-or-install-protected-package 'bind-key t)
(spacemacs/load-or-install-protected-package 'which-key t)
(spacemacs/load-or-install-protected-package 'use-package t)
(setq use-package-verbose init-file-debug)
;; package-build is required by quelpa
@ -101,20 +105,15 @@
quelpa-persistent-cache-file (expand-file-name "cache" quelpa-dir)
quelpa-update-melpa-p nil)
(spacemacs/load-or-install-protected-package 'quelpa t)
;; inject use-package hooks for easy customization of
;; stock package configuration
;; inject use-package hooks for easy customization of stock package
;; configuration
(setq use-package-inject-hooks t)
;; which-key
(spacemacs/load-or-install-protected-package 'which-key t)
;; evil must be installed at the beginning of the
;; boot sequence.
;; Use C-u as scroll-up (must be set before actually loading evil)
(spacemacs/load-or-install-protected-package 'evil t)
(require 'core-keybindings)
;; for convenience and user support
(unless (fboundp 'tool-bar-mode)
(spacemacs-buffer/message (concat "No graphical support detected, you won't be"
"able to launch a graphical instance of Emacs"
(spacemacs-buffer/message (concat "No graphical support detected, "
"you won't be able to launch a "
"graphical instance of Emacs"
"with this build.")))
;; check for new version
(if dotspacemacs-mode-line-unicode-symbols

View File

@ -683,7 +683,8 @@ the right."
(if (buffer-file-name)
(call-interactively 'evil-write)
(call-interactively 'write-file)))
(evil-declare-not-repeat 'spacemacs/write-file)
(with-eval-after-load 'evil
(evil-declare-not-repeat 'spacemacs/write-file))
(defun spacemacs/dos2unix ()
"Converts the current buffer to UNIX file format."

View File

@ -18,14 +18,6 @@
;; improve delete-other-windows
(define-key global-map (kbd "C-x 1") 'spacemacs/toggle-maximize-buffer)
;; replace `dired-goto-file' with `helm-find-files', since `helm-find-files'
;; can do the same thing and with fuzzy matching and other features.
(with-eval-after-load 'dired
(evil-define-key 'normal dired-mode-map "J" 'spacemacs/helm-find-files)
(define-key dired-mode-map "j" 'spacemacs/helm-find-files)
(evil-define-key 'normal dired-mode-map (kbd dotspacemacs-leader-key)
spacemacs-default-map))
;; alternate binding to search next occurrence with isearch without
;; exiting isearch
(define-key isearch-mode-map (kbd "S-<return>") 'isearch-repeat-forward)
@ -35,7 +27,6 @@
;; Make <escape> quit as much as possible
(define-key minibuffer-local-map (kbd "<escape>") 'keyboard-escape-quit)
(define-key evil-visual-state-map (kbd "<escape>") 'keyboard-quit)
(define-key minibuffer-local-ns-map (kbd "<escape>") 'keyboard-escape-quit)
(define-key minibuffer-local-completion-map (kbd "<escape>") 'keyboard-escape-quit)
(define-key minibuffer-local-must-match-map (kbd "<escape>") 'keyboard-escape-quit)
@ -47,17 +38,8 @@
(global-set-key (kbd "<left-margin> <double-mouse-1>") 'spacemacs/select-current-block)
(global-set-key (kbd "<left-margin> <drag-mouse-1>") 'spacemacs/mu-select-linum)
;; motions keys for help buffers
(evil-define-key 'motion help-mode-map (kbd "<tab>") 'forward-button)
(evil-define-key 'motion help-mode-map (kbd "S-<tab>") 'backward-button)
(evil-define-key 'motion help-mode-map (kbd "]") 'help-go-forward)
(evil-define-key 'motion help-mode-map (kbd "gf") 'help-go-forward)
(evil-define-key 'motion help-mode-map (kbd "[") 'help-go-back)
(evil-define-key 'motion help-mode-map (kbd "gb") 'help-go-back)
(evil-define-key 'motion help-mode-map (kbd "gh") 'help-follow-symbol)
;; ---------------------------------------------------------------------------
;; evil-leader key bindings
;; spacemacs leader key bindings
;; ---------------------------------------------------------------------------
;; Universal argument ---------------------------------------------------------

View File

@ -239,14 +239,29 @@
(define-key evil-window-map (kbd "<right>") 'evil-window-right)
(define-key evil-window-map (kbd "<up>") 'evil-window-up)
(define-key evil-window-map (kbd "<down>") 'evil-window-down)
(spacemacs/set-leader-keys "re" 'evil-show-registers)
(define-key evil-visual-state-map (kbd "<escape>") 'keyboard-quit)
;; motions keys for help buffers
(evil-define-key 'motion help-mode-map (kbd "<tab>") 'forward-button)
(evil-define-key 'motion help-mode-map (kbd "S-<tab>") 'backward-button)
(evil-define-key 'motion help-mode-map (kbd "]") 'help-go-forward)
(evil-define-key 'motion help-mode-map (kbd "gf") 'help-go-forward)
(evil-define-key 'motion help-mode-map (kbd "[") 'help-go-back)
(evil-define-key 'motion help-mode-map (kbd "gb") 'help-go-back)
(evil-define-key 'motion help-mode-map (kbd "gh") 'help-follow-symbol)
;; After major mode has changed, reset evil-shift-width
(add-hook 'after-change-major-mode-hook 'spacemacs//set-evil-shift-width 'append)
;; replace `dired-goto-file' with `helm-find-files', since `helm-find-files'
;; can do the same thing and with fuzzy matching and other features.
(with-eval-after-load 'dired
(evil-define-key 'normal dired-mode-map "J" 'spacemacs/helm-find-files)
(define-key dired-mode-map "j" 'spacemacs/helm-find-files)
(evil-define-key 'normal dired-mode-map (kbd dotspacemacs-leader-key)
spacemacs-default-map))
;; It's better that the default value is too small than too big
(setq-default evil-shift-width 2)
;; After major mode has changed, reset evil-shift-width
(add-hook 'after-change-major-mode-hook 'spacemacs//set-evil-shift-width 'append)
(defmacro evil-map (state key seq)
"Map for a given STATE a KEY to a sequence SEQ of keys.