From 8e5daed796494e602423bdedb1902fb7519b522e Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Fri, 4 Jan 2013 01:34:02 +0100 Subject: [PATCH] Emacs: Cleanup the other sections --- .emacs.d/init.org | 49 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/.emacs.d/init.org b/.emacs.d/init.org index 2041f5a..e21f45a 100644 --- a/.emacs.d/init.org +++ b/.emacs.d/init.org @@ -260,30 +260,56 @@ * Aliases - There are some functions that are just better than others, no - matter how politically incorrect it might be to admit. + I've never had any trouble with accidentally pressing ~y~ while being + asked a question, so I've never had any reason to prefer ~yes-or-no-p~ + over ~y-or-n-p~. + + #+begin_src emacs-lisp :tangle init2.el + (defalias 'yes-or-no-p 'y-or-n-p) + #+end_src + + ~ibuffer~ is a drop-in replacement for ~list-buffers~, but with more + features. + + #+begin_src emacs-lisp :tangle init2.el + (defalias 'list-buffers 'ibuffer) + #+end_src + + I don't know if replacing ~dabbrev-expand~ with ~hippie-expand~, but at + least ~hippie-expand~ doesn't use ~dabbrev-expand~, and I haven't + noticed anything wrong so far, and ~hippie-expand~ does so much more + than ~dabbrev-expand~. #+BEGIN_SRC emacs-lisp :tangle init2.el - (defalias 'yes-or-no-p 'y-or-n-p) - (defalias 'list-buffers 'ibuffer) (defalias 'dabbrev-expand 'hippie-expand) #+END_SRC * Faces - Define faces for use with ~magit~ log edit mode. + Define a face to how the summary line of git commits as the first + headline of an ~org-mode~ file. - #+BEGIN_SRC emacs-lisp :tangle init2.el + #+begin_src emacs-lisp :tangle init2.el (defface git-commit-summary-face '((t (:inherit org-level-1))) "Face for the git title line." :group 'local) + #+end_src + Define a face to show characters that have been placed beyond the + maximum length of a summary line. + + #+begin_src emacs-lisp :tangle init2.el (defface git-commit-overlong-summary-face '((t (:background "#873732"))) "Face for commit titles that are too long." :group 'local) + #+end_src + Define a face to show characters that have been placed on the second + line of a git commit. Those should always remain empty. + + #+BEGIN_SRC emacs-lisp :tangle init2.el (defface git-commit-nonempty-second-line-face '((t (:inherit git-commit-overlong-summary-face))) "Face for the supposedly empty line in commit messages." @@ -292,19 +318,14 @@ * Keys - With the awesome power of Emacs comes the need for lots of - keybindings. - -** Translation - - Since the ~C-l~ combination is so much easier than ~C-j~ when using - the [[http://colemak.com][colemak]] keyboard layout and ~C-j~ is used so much more, switch - them. + Since the ~C-l~ combination is so much easier than ~C-j~ when using the + [[http://colemak.com][colemak]] keyboard layout and I use ~C-j~ much more, switch them. #+BEGIN_SRC emacs-lisp tangle init2.el (define-key key-translation-map (kbd "C-j") (kbd "C-l")) (define-key key-translation-map (kbd "C-l") (kbd "C-j")) #+END_SRC + * Footnotes [fn:1] Though it doesn't happen often that ~trunk~ is so messed up that