From aed7c5fe3f81e17d744eef82a39f0a7e48ada993 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Wed, 12 Jun 2013 23:46:26 +0200 Subject: [PATCH] Emacs: fixed typo and support for Emacs light. --- .emacs | 12 ++++++------ .emacs-light | 48 ++++++++++++++++++++++++++++++++---------------- 2 files changed, 38 insertions(+), 22 deletions(-) diff --git a/.emacs b/.emacs index 30127cad..25638e2b 100644 --- a/.emacs +++ b/.emacs @@ -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) diff --git a/.emacs-light b/.emacs-light index 8b28a88a..d52d0973 100644 --- a/.emacs-light +++ b/.emacs-light @@ -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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -