1 ;;; A simple rc to customize Emacs' UI to my tastes.
4 (setq default-frame-alist
7 (vertical-scroll-bars . nil
)
11 (setq inhibit-startup-screen t
)
13 ;;; Empirically, Emacs on Windows and OS X has a very nice default
14 ;;; font. On the other hand, the systems which feature a GTK Emacs are
15 ;;; unlikely to have a very servicable default. GNU's FreeMono is a
16 ;;; nice Courier clone with good unicode coverage, and is usually
19 (set-face-attribute 'default nil
24 ;;; If nil, input (keyboard or mouse) interrupts redisplay.
25 (setq redisplay-dont-pause t
)
27 ;;; Font lock is Emacs for "syntax highlighting".
28 (global-font-lock-mode -
1)
30 ;;; By default, only the row number is shown in the modeline.
33 ;;; Highlight matching parenthesis at point.
36 (setq-default doc-view-resolution
300)
38 ;;; eldoc-mode employs the minibuffer to prompt parameter lists and
39 ;;; docstrings for Emacs Lisp objects, and also generally
40 ;;; (e.g. Clojure's nrepl uses eldoc).
41 (add-hook 'emacs-lisp-mode-hook
'turn-on-eldoc-mode
)
42 (add-hook 'lisp-interaction-mode-hook
'turn-on-eldoc-mode
)
43 (add-hook 'ielm-mode-hook
'turn-on-eldoc-mode
)
45 ;;; Prompt keystrokes quickly.
46 (setq echo-keystrokes
0.0166)
48 ;;; By default, Emacs rings the bell on end of buffer, and other
50 (setq ring-bell-function
'ignore
)
52 (defalias 'yes-or-no-p
'y-or-n-p
)
54 ;;; The default assumes far less capable hardware than I usually
56 (setq large-file-warning-threshold
100000000)
58 ;;; Make sure, no matter what, ediff uses one frame.
59 (setq ediff-window-setup-function
'ediff-setup-windows-plain
)
61 ;;; Minibuffer tab completion.
64 (when (require 'ido nil t
)
68 ;;; Slightly simplified by preferring ansi-term defaults.
69 (when (require 'term nil t
)
70 ;; Many programs (including grml zsh) (seem to) assume this
72 (setq term-scroll-to-bottom-on-output
'this
)
73 (setq term-scroll-show-maximum-output t
))
75 ;;; Follow compile errors with tab.
76 (add-hook 'compilation-mode-hook
'next-error-follow-minor-mode
)
78 ;;; By default, moving the point past the bottom of a page in docview
79 ;;; does not jump to next page.
80 (setq doc-view-continuous t
)
82 ;;; Enable some "confusing" commands.
83 (put 'set-goal-column
'disabled nil
)
84 (put 'erase-buffer
'disabled nil
)
85 (put `upcase-region
`disabled nil
)
86 (put `downcase-region
`disabled nil
)
87 (put 'dired-find-alternate-file
'disabled nil
)
89 ;;; The defaults in this case are S-<arrow keys>.
90 (windmove-default-keybindings)
92 (global-set-key (kbd "C-c p") 'proced
)
93 (global-set-key (kbd "C-c b") 'bury-buffer
)
94 (global-set-key (kbd "C-c d") 'yard-toggle-window-dedication
)
95 (global-set-key (kbd "C-c q") 'yard-quit-other-window
)
96 (global-set-key (kbd "C-c r") 'yard-root-find-file
)
97 (global-set-key (kbd "C-c c") 'save-buffers-kill-emacs
)
99 (define-key emacs-lisp-mode-map
(kbd "M-.")
100 'yard-find-function-at-point
)
102 (define-key emacs-lisp-mode-map
(kbd "M-*")
103 'yard-pop-find-symbol-stack
)
105 ;;; Aristotelean scrolling maps better to the hardware I use.
106 (setq mouse-wheel-progressive-speed nil
)
108 (setq focus-follows-mouse t
)
109 (setq mouse-autoselect-window t
)
110 (setq mouse-yank-at-point t
)
112 (define-key emacs-lisp-mode-map
(kbd "<C-S-mouse-1>")
113 (lambda (event prefix-arg
)
116 (mouse-set-point event
)
117 (yard-find-function-at-point prefix-arg
)))
119 (define-key emacs-lisp-mode-map
(kbd "<mouse-9>")
120 'yard-pop-find-symbol-stack
)
122 (when (require 'help-mode nil t
)
123 (define-key help-mode-map
(kbd "<mouse-8>") 'help-go-forward
)
124 (define-key help-mode-map
(kbd "<mouse-9>") 'help-go-back
))