2013-01-09 11:55:55 +01:00
|
|
|
;; -*- mode:emacs-lisp -*-
|
2012-06-15 16:54:02 +02:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;; Emacs config
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
|
2013-06-11 17:07:01 +02:00
|
|
|
(defvar my-keys-minor-mode-map (make-keymap)
|
|
|
|
"Keymap for my-keys-minor-mode. See its docstring for more
|
|
|
|
details.")
|
2013-06-07 20:17:26 +02:00
|
|
|
|
|
|
|
(define-minor-mode my-keys-minor-mode
|
2013-06-11 17:07:01 +02:00
|
|
|
"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
|
2013-06-07 20:17:26 +02:00
|
|
|
|
2013-06-11 17:07:01 +02:00
|
|
|
(define-key my-keys-minor-mode-map (kbd \"C-i\") 'some-function)"
|
|
|
|
t " my-keys" 'my-keys-minor-mode-map)
|
2013-06-07 20:17:26 +02:00
|
|
|
(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.
|
2013-02-27 18:44:46 +01:00
|
|
|
(add-to-list 'load-path "~/.emacs.d/plugins")
|
2012-10-12 13:47:10 +02:00
|
|
|
|
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)
|
2013-06-26 23:54:50 +02:00
|
|
|
(load "~/.emacs.d/mode-dot.el" nil t)
|
2013-06-12 23:46:26 +02:00
|
|
|
(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)))
|
2013-06-12 23:46:26 +02:00
|
|
|
(load "~/.emacs.d/mode-python.el" nil t)
|
2013-10-07 20:01:45 +02:00
|
|
|
(load "~/.emacs.d/mode-shell.el" nil t)
|
2013-06-12 23:46:26 +02:00
|
|
|
(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)
|
2013-01-08 23:57:55 +01:00
|
|
|
|
2013-06-11 17:07:01 +02:00
|
|
|
;; We need to put it at the end to make sure it doesn't get overriden by other
|
|
|
|
;; minor modes.
|
2013-02-04 21:32:40 +01:00
|
|
|
(my-keys-minor-mode 1)
|
|
|
|
|
2013-01-08 23:57:55 +01:00
|
|
|
;; End of file
|
2013-03-02 19:34:12 +01:00
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|