Emacs: fixed typo and support for Emacs light.

master
Pierre Neidhardt 2013-06-12 23:46:26 +02:00
parent 943000ae23
commit aed7c5fe3f
2 changed files with 38 additions and 22 deletions

12
.emacs
View File

@ -34,12 +34,12 @@ Example: to assign some-function to C-i, use
(load "~/.emacs.d/functions" nil t)
(load "~/.emacs.d/main" nil t)
(load "~/.emacsmd/mode-c.el" nil t)
(load "~/.emacsmd/mode-mediawiki.el" nil t)
(load "~/.emacsmd/mode-python.el" nil t)
(load "~/.emacsmd/mode-tex.el" nil t)
(load "~/.emacsmd/mode-texinfo.el" nil t)
(load "~/.emacsmd/mode-yasnippet.el" nil t)
(load "~/.emacs.d/mode-c.el" nil t)
(load "~/.emacs.d/mode-mediawiki.el" nil t)
(load "~/.emacs.d/mode-python.el" nil t)
(load "~/.emacs.d/mode-tex.el" nil t)
(load "~/.emacs.d/mode-texinfo.el" nil t)
(load "~/.emacs.d/mode-yasnippet.el" nil t)
(load "~/.emacs.d/personal" nil t)
(load "~/.emacs.d/theme" nil t)

View File

@ -1,35 +1,51 @@
;; -*- mode:emacs-lisp -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Emacs config
;; 2013-01-09
;; 2013-06-12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; We use a minor mode to override global keys. To assign global keys, you need
;; to write:
;;
;; (define-key my-keys-minor-mode-map (kbd "C-i") 'some-function)
(defvar my-keys-minor-mode-map (make-keymap) "my-keys-minor-mode keymap.")
(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 my key settings override annoying major modes."
t " my-keys" 'my-keys-minor-mode-map)
"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) ) )
;; Main should be loaded first.
(load "~/.emacs.d/main" nil t)
;; (add-to-list 'load-path "~/.emacs.d/plugins")
;; Cache folder is everything we do not want to track.
(setq emacs-cache-folder "~/.cache/emacs/")
(if
(not (file-directory-p emacs-cache-folder))
(make-directory emacs-cache-folder t))
;; 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")
(load "~/.emacs.d/functions" nil t)
(load "~/.emacs.d/modes" nil t)
(load "~/.emacs.d/main" nil t)
(load "~/.emacs.d/mode-c.el" nil t)
(load "~/.emacs.d/mode-mediawiki.el" nil t)
(load "~/.emacs.d/mode-python.el" nil t)
(load "~/.emacs.d/mode-tex.el" nil t)
(load "~/.emacs.d/mode-texinfo.el" nil t)
;; (load "~/.emacs.d/mode-yasnippet.el" nil t)
(load "~/.emacs.d/personal" nil t)
;; (load "~/.emacs.d/plugins" nil t)
(load "~/.emacs.d/theme" nil t)
;; We need to put it at the end to make sure it doesn't get itself overriden by
;; other minor modes.
;; 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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;