forked from netj/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.emacs
121 lines (104 loc) · 3.71 KB
/
.emacs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
;; netj's ~/.emacs
;; Author: Jaeho Shin <[email protected]>
;; Created: 2006-01-03
;; for detecting operating system
(defun system-type-is-mac ()
(interactive)
"Return true if system is darwin-based (Mac OS X)"
(string-equal system-type "darwin"))
(defun system-type-is-gnu ()
(interactive)
"Return true if system is GNU/Linux-based"
(string-equal system-type "gnu/linux"))
;; behavior
(set-language-environment "UTF-8")
(set-language-environment-input-method "Korean")
(setq shell-command-switch "-ic")
;; respect local config
(load "~/.emacs_local" t)
(push "~/.emacs.d/elisp" load-path)
(setq inhibit-startup-message t)
(defalias 'yes-or-no-p 'y-or-n-p)
(icomplete-mode)
(setq case-fold-search t)
(setq kill-whole-line t)
(setq make-backup-files nil)
(auto-compression-mode t)
(setq-default auto-fill-function 'do-auto-fill)
(setq fill-column 78)
(global-set-key "\C-x\C-j" 'goto-line)
(defun other-window-reverse () "previous-window" (interactive) (other-window -1))
(global-set-key "\C-x\C-o" 'other-window-reverse)
;; looks
(defun frame-attr (attr) (add-to-list 'default-frame-alist attr))
;(frame-attr '(cursor-color . "blue violet"))
;(frame-attr '(background-color . "thistle"))
(when (system-type-is-mac)
(create-fontset-from-fontset-spec
"-*-*-*-*-*-*-16-160-*-*-*-*-fontset-j,
latin:-apple-consolas-*-*-*-*-*-*-*-*-m-*-iso10646-1,
hangul:-apple-HCR Dotum LVT-*-*-*-*-*-*-*-*-p-*-iso10646-1")
;; ;(frame-attr '(font . "*-Palatino-medium-r-*-160-*-iso10646-1"))
(frame-attr '(font . "-*-16-*-fontset-j"))
)
;; color-theme
(load "color-theme.el")
;; ;; greenish
;; (color-theme-subtle-hacker)
;; (color-theme-gnome2)
;; (color-theme-pok-wog)
;; (color-theme-bharadwaj-slate)
;; (color-theme-jonadabian-slate)
;; ;; blueish
(color-theme-dark-blue2)
;; (color-theme-deep-blue)
;; (color-theme-sitaramv-solaris)
(tool-bar-mode 0)
(menu-bar-mode 1)
(column-number-mode t)
(transient-mark-mode t)
(global-font-lock-mode t)
(show-paren-mode t)
(setq font-lock-maximum-decoration t)
(setq font-lock-maximum-size nil)
(setq display-time-24hr-format t)
;; AUCTeX
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)
(setq TeX-shell shell-file-name)
(setq TeX-shell-command-option shell-command-switch)
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq TeX-PDF-mode t)
;; See-Also: http://www.bleedingmind.com/index.php/2010/06/17/synctex-on-linux-and-mac-os-x-with-emacs/
(add-hook 'LaTeX-mode-hook 'TeX-source-correlate-mode)
(setq TeX-source-correlate-method 'synctex)
(server-start)
(when (system-type-is-mac)
;; for Mac, add the "open" command for viewing pdf
(setq TeX-view-program-list '(("Open" "open %o")))
(setq TeX-view-program-selection '((output-pdf "Open")))
;;; See-Also: http://tex.stackexchange.com/questions/11613/launching-an-external-pdf-viewer-from-emacs-auctex-on-a-mac-osx-fails
(add-hook 'LaTeX-mode-hook
(lambda()
(add-to-list 'TeX-expand-list
'("%q" skim-make-url))))
(defun skim-make-url () (concat
(TeX-current-line)
" "
(expand-file-name (funcall file (TeX-output-extension) t)
(file-name-directory (TeX-master-file)))
" "
(buffer-file-name)))
(setq TeX-view-program-list
'(("Skim" "/Applications/Skim.app/Contents/SharedSupport/displayline %q")))
(setq TeX-view-program-selection '((output-pdf "Skim")))
)
;; Markdown mode
;; http://jblevins.org/projects/markdown-mode/
(autoload 'markdown-mode "markdown-mode.el"
"Major mode for editing Markdown files" t)
(push '("\\.geul" . markdown-mode) auto-mode-alist)
(push '("\\.markdown" . markdown-mode) auto-mode-alist)
(push '("\\.mkd" . markdown-mode) auto-mode-alist)
;; END OF .emacs