Emacs: fixed typo and support for Emacs light.
parent
943000ae23
commit
aed7c5fe3f
12
.emacs
12
.emacs
|
@ -34,12 +34,12 @@ Example: to assign some-function to C-i, use
|
||||||
|
|
||||||
(load "~/.emacs.d/functions" nil t)
|
(load "~/.emacs.d/functions" nil t)
|
||||||
(load "~/.emacs.d/main" nil t)
|
(load "~/.emacs.d/main" nil t)
|
||||||
(load "~/.emacsmd/mode-c.el" nil t)
|
(load "~/.emacs.d/mode-c.el" nil t)
|
||||||
(load "~/.emacsmd/mode-mediawiki.el" nil t)
|
(load "~/.emacs.d/mode-mediawiki.el" nil t)
|
||||||
(load "~/.emacsmd/mode-python.el" nil t)
|
(load "~/.emacs.d/mode-python.el" nil t)
|
||||||
(load "~/.emacsmd/mode-tex.el" nil t)
|
(load "~/.emacs.d/mode-tex.el" nil t)
|
||||||
(load "~/.emacsmd/mode-texinfo.el" nil t)
|
(load "~/.emacs.d/mode-texinfo.el" nil t)
|
||||||
(load "~/.emacsmd/mode-yasnippet.el" nil t)
|
(load "~/.emacs.d/mode-yasnippet.el" nil t)
|
||||||
(load "~/.emacs.d/personal" nil t)
|
(load "~/.emacs.d/personal" nil t)
|
||||||
(load "~/.emacs.d/theme" nil t)
|
(load "~/.emacs.d/theme" nil t)
|
||||||
|
|
||||||
|
|
48
.emacs-light
48
.emacs-light
|
@ -1,35 +1,51 @@
|
||||||
;; -*- mode:emacs-lisp -*-
|
;; -*- mode:emacs-lisp -*-
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Emacs config
|
;; Emacs config
|
||||||
;; 2013-01-09
|
;; 2013-06-12
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
;; We use a minor mode to override global keys. To assign global keys, you need
|
(defvar my-keys-minor-mode-map (make-keymap)
|
||||||
;; to write:
|
"Keymap for my-keys-minor-mode. See its docstring for more
|
||||||
;;
|
details.")
|
||||||
;; (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.")
|
|
||||||
|
|
||||||
(define-minor-mode my-keys-minor-mode
|
(define-minor-mode my-keys-minor-mode
|
||||||
"A minor mode so that my key settings override annoying major modes."
|
"A minor mode so that all bindings assingned on the
|
||||||
t " my-keys" 'my-keys-minor-mode-map)
|
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) ) )
|
(add-hook 'minibuffer-setup-hook (lambda () (my-keys-minor-mode 0) ) )
|
||||||
|
|
||||||
;; Main should be loaded first.
|
;; Cache folder is everything we do not want to track.
|
||||||
(load "~/.emacs.d/main" nil t)
|
(setq emacs-cache-folder "~/.cache/emacs/")
|
||||||
;; (add-to-list 'load-path "~/.emacs.d/plugins")
|
(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/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/personal" nil t)
|
||||||
;; (load "~/.emacs.d/plugins" nil t)
|
|
||||||
(load "~/.emacs.d/theme" 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
|
;; We need to put it at the end to make sure it doesn't get overriden by other
|
||||||
;; other minor modes.
|
;; minor modes.
|
||||||
(my-keys-minor-mode 1)
|
(my-keys-minor-mode 1)
|
||||||
|
|
||||||
;; End of file
|
;; End of file
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue