ambevar-dotfiles/.emacs.d/init.el

57 lines
2.0 KiB
EmacsLisp
Raw Normal View History

;; -*- mode:emacs-lisp -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Emacs config
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defvar my-keys-minor-mode-map (make-keymap)
"Keymap for my-keys-minor-mode. See its docstring for more
details.")
(define-minor-mode my-keys-minor-mode
"A minor mode so that all bindings assingned on the
my-keys-minor-mode-map override undesired major modes
bindings. We use a minor mode to override global keys. This is
also rather useful to list all personal global bindings: just
rgrep `my-keys-minor-mode-map' over `~/.emacs.d'.
Example: to assign some-function to C-i, use
(define-key my-keys-minor-mode-map (kbd \"C-i\") 'some-function)"
t " my-keys" 'my-keys-minor-mode-map)
(add-hook 'minibuffer-setup-hook (lambda () (my-keys-minor-mode 0) ) )
2013-07-03 14:04:51 +02:00
(defvar emacs-cache-folder "~/.cache/emacs/"
"Cache folder is everything we do not want to track along with
the configuration files.")
2013-06-16 14:27:14 +02:00
(if (not (file-directory-p emacs-cache-folder))
2013-06-12 22:56:30 +02:00
(make-directory emacs-cache-folder t))
2014-02-12 17:37:43 +01:00
;; Load config easily.
(add-to-list 'load-path "~/.emacs.d")
2013-06-12 23:40:20 +02:00
;; Local plugin folder for quick install. All files in this folder will be
;; accessible to Emacs config.
(add-to-list 'load-path "~/.emacs.d/plugins")
2013-06-12 22:56:30 +02:00
2013-01-10 22:21:30 +01:00
(load "~/.emacs.d/functions" nil t)
2013-06-12 22:56:30 +02:00
(load "~/.emacs.d/main" nil t)
2013-07-03 14:04:51 +02:00
(load "~/.emacs.d/mode-cc.el" nil t)
(load "~/.emacs.d/mode-dot.el" nil t)
(load "~/.emacs.d/mode-mediawiki.el" nil t)
2014-02-12 17:37:43 +01:00
(add-hook 'perl-mode-hook (lambda () (require 'mode-perl)))
(load "~/.emacs.d/mode-python.el" nil t)
2013-10-07 20:01:45 +02:00
(load "~/.emacs.d/mode-shell.el" nil t)
(load "~/.emacs.d/mode-tex.el" nil t)
(load "~/.emacs.d/mode-texinfo.el" nil t)
2013-06-12 22:56:30 +02:00
(load "~/.emacs.d/personal" nil t)
2013-07-03 14:04:51 +02:00
(load "~/.emacs.d/snippets.el" nil t)
2013-01-10 22:21:30 +01:00
(load "~/.emacs.d/theme" nil t)
;; We need to put it at the end to make sure it doesn't get overriden by other
;; minor modes.
(my-keys-minor-mode 1)
;; End of file
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;