Last active
August 29, 2015 14:06
-
-
Save amake/8df6f9827019b0085b98 to your computer and use it in GitHub Desktop.
My emacs init.el
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Increase default font size. | |
(set-face-attribute 'default nil :height 180) | |
;; Set decent default fonts for Japanese and Chinese, | |
;; but *only* if in a graphical context. | |
;; Set Japanese second so that Japanese glyphs override Chinese | |
;; when both charsets cover the same codepoints. | |
(if (fboundp 'set-fontset-font) | |
(progn | |
(set-fontset-font | |
nil | |
'chinese-gbk | |
(font-spec :family "Hiragino Sans GB W3")) | |
(set-fontset-font | |
nil | |
'japanese-jisx0213.2004-1 | |
(font-spec :family "Hiragino Kaku Gothic ProN")))) | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(ns-pop-up-frames nil) | |
'(tab-width 4) | |
'(ediff-split-window-function 'split-window-horizontally) | |
'(ediff-window-setup-function 'ediff-setup-windows-plain)) | |
(custom-set-faces | |
;; custom-set-faces was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
) | |
;; Use aspell as installed by MacPorts. | |
(setq ispell-program-name "/opt/local/bin/aspell") | |
(add-hook 'text-mode-hook 'flyspell-mode) | |
(add-hook 'prog-mode-hook 'flyspell-prog-mode) | |
(setq-default indent-tabs-mode nil) | |
(show-paren-mode) | |
(column-number-mode) | |
;; Only on GUI | |
(if window-system | |
(progn | |
;; Restore session | |
(desktop-save-mode t) | |
;; Disable C-z (suspend-frame) in GUI because it's pointless | |
;; and I keep hitting it. | |
(global-unset-key "\C-z") | |
;; Run server so `emacsclient` will edit in GUI editor. | |
;; May have to prepend /Applications/Emacs.app/Contents/MacOS/bin | |
;; to PATH on OS X. | |
(server-start) | |
;; ediff customizations | |
;; https://www.ogre.com/node/446 | |
(add-hook 'ediff-before-setup-hook | |
'new-frame) | |
(add-hook 'ediff-quit-hook | |
'delete-frame) | |
(add-hook 'ediff-startup-hook | |
'(lambda () | |
(set-frame-size (selected-frame) 175 55) | |
(raise-frame (selected-frame)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment