root/dotfiles/emacs/mrkn/.emacs @ 4088

Revision 4088, 6.1 kB (checked in by mrkn, 6 years ago)

dotfiles/emacs/mrkn/.emacs: change default font size.

  • Property svn:keywords set to Id
Line 
1;;; $Id$
2(if (featurep 'meadow) (cd (expand-file-name "~")))
3
4;;; Load path
5(setq load-path
6      (cons (expand-file-name "~/elisp/")
7            load-path))
8
9;;; personal information
10(setq user-full-name "Kenta Murata")
11(setq user-mail-address "muraken@gmail.com")
12
13;;; Language evnrionment
14(if (featurep 'mule)
15    (progn
16      (if (featurep 'meadow)
17          (require 'un-define))
18      (set-language-environment "Japanese")
19      (prefer-coding-system 'utf-8-unix)
20      ))
21
22;; for Japanese info files
23(auto-compression-mode t)
24
25;; japanese grep
26(if (file-exists-p "/usr/bin/lgrep")
27    (setq grep-command "lgrep -n"))
28
29;;; SKK
30(if (string-match "^GNU Emacs 23" (emacs-version))
31    (progn
32      (set-input-method "japanese-skk")
33      (toggle-input-method nil)))
34
35;;; UIM
36;;; 起動コマンド:
37;;;   env GTK_IM_MODULE=xim XMODIFIERS="@im=none" emacs
38;;;
39;;; .Xresources:
40;;;   Emacs*xnlLanguage: C
41;;;   Emacs*useXIM: false
42(if (and (not (featurep 'meadow))
43         (not (string-match "^GNU Emacs 23" (emacs-version))))
44    (progn
45      (require 'uim-leim)
46      (set-input-method "japanese-skk-uim")
47      (toggle-input-method nil)
48      (global-set-key "\C-x\C-j" 'toggle-input-method)))
49
50;;; Font settings
51(load "~/.emacs.d/fonts.el")
52(when window-system
53  (if (or (featurep 'meadow)
54          (string-match "^GNU Emacs 23" (emacs-version)))
55      (setq default-frame-alist
56            (append (list (if (featurep 'meadow)
57                              '(font . "MeiryoKe_Console 12")
58                            '(font . "fontset-m+2vm+ipag circle_10"))
59                          '(width . 96))
60                    default-frame-alist))))
61
62;; global font-lock mode
63(require 'font-lock)
64(if (not (featurep 'xemacs))
65    (global-font-lock-mode t))
66
67;;; disable tool-bar mode
68(when window-system
69  (tool-bar-mode nil))
70
71;;; set scroll-bar on right
72(if window-system
73    (set-scroll-bar-mode 'right))
74
75;;; enable line- and column-number-mode
76(line-number-mode t)
77(column-number-mode t)
78
79;;; enable show-paren-mode in expression style
80(show-paren-mode t)
81(setq show-paren-style 'expression)
82
83;;; enable transient-mark-mode
84(transient-mark-mode t)
85
86;;; enable partial-completion-mode
87(partial-completion-mode t)
88
89;;; enable mouse-wheel-mode
90(mouse-wheel-mode t)
91
92;;; global key bindings
93(global-set-key "\C-h" 'backward-delete-char)
94(global-set-key "\M-?" 'help-for-help)
95(global-set-key "\M-g" 'goto-line)
96(global-set-key [f1] 'help-for-help)
97(global-set-key "\C-cs" 'svn-status)
98
99;;; universal diff
100(setq diff-switches "-uN")
101
102;;; aspell
103(setq ispell-program-name "aspell")
104
105;; TRAMP
106(require 'tramp-util)
107(setq tramp-default-method
108      (if (featurep 'meadow) "plink" "ssh"))
109(setq tramp-completion-without-shell-p t)
110(add-to-list 'backup-directory-alist
111             (cons tramp-file-name-regexp nil))
112(if (featurep 'meadow)
113    (setq tramp-encoding-shell "tcsh"
114          tramp-encoding-command-switch "-c"
115          tramp-ls-command "ls"
116          ls-lisp-use-insert-directory-program t))
117
118;;; fakecygpty
119(if (featurep 'meadow)
120    (setq mw32-process-wrapper-alist
121          '(("/\\(bash\\|tcsh\\|svn\\|ssh\\|scp\\|gpg[esvk]?\\)\\.exe" .
122             (nil . ("fakecygpty.exe" . set-process-connection-type-pty))))
123          ))
124
125;;; shell setting using bash
126(if (featurep 'meadow)
127    (progn
128      (setq explicit-shell-file-name "bash.exe")
129      (setq shell-file-name "c:/cygwin/bin/bash.exe")
130      )
131  (progn
132    (setq explicit-shell-file-name "bash")
133    (setq shell-file-name "/bin/bash")
134    (setq shell-prompt-pattern "^[^$]*\$ *")
135    (add-hook 'shell-mode-hook
136              '(lambda ()
137                 (setq comint-process-echoes t)))
138    ))
139(setq shell-command-switch "-c")
140(setq explicit-bash-args '("--login"))
141(autoload 'ansi-color-for-comint-mode-on "ansi-color"
142  "Set `ansi-color-for-comint-mode' to t." t)
143(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
144
145;;; Cygwin
146
147
148;;; subversion
149(setq svn-status-svn-environment-var-list '("LC_MESSAGES=C"))
150
151;;; cc-mode settings
152(load "~/.emacs.d/ccmode.el")
153
154;;; for autoloading inf-ruby when run-ruby is refered
155(autoload 'run-ruby "inf-ruby"
156  "Run an inferior Ruby process" t)
157(autoload 'run-ruby-keys "inf-ruby"
158  "Set local key defs for inf-ruby in ruby-mode" t)
159(add-hook 'ruby-mode-hook
160          '(lambda ()
161             (inf-ruby-keys)))
162(if (featurep 'meadow)
163    (add-hook 'inferior-ruby-mode-hook
164              '(lambda ()
165                 (setq comint-process-echoes t))))
166
167;;; for InstantRails
168(if (featurep 'meadow)
169    (defun instant-rails (&optional buffer)
170      ""
171      (interactive
172       (list
173        (and current-prefix-arg
174             (read-buffer "Shell buffer: "
175                          (generate-new-buffer-name "*instant-rails*")))))
176      (setq buffer (get-buffer-create (or buffer "*instant-rails*")))
177      ;; Pop to buffer, so that the buffer's window will be correctly set
178      ;; when we call comint (so that comint sets the COLUMN env var properly).
179      (pop-to-buffer buffer)
180      (unless (comint-check-proc buffer)
181        (let* ((startfile "c:/InstantRails/use_ruby.cmd"))
182          (apply 'make-comint-in-buffer "instant-rails" buffer "cmd.exe"
183                 startfile '("\Q"))
184          (shell-mode)
185          (setq default-directory "c:/InstantRails/rails_apps")))
186      buffer))
187
188;;; JavaScript
189(autoload 'javascript-mode "javascript" nil t)
190(add-to-list 'auto-mode-alist
191             (cons "\\.\\(js\\|as\\|json\\|jsn\\)$"
192                   'javascript-mode))
193(setq js-indent-level 2)
194
195;;; Erlang
196
197
198;;; GNU Global
199(load "~/.emacs.d/global.el")
200
201;;; muse
202
203;;; AUCTeX
204(require 'tex-site)
205(require 'tex-jp)
206(setq TeX-auto-save t)
207(setq TeX-parse-self t)
208(setq-default TeX-master t)
209(setq TeX-default-mode 'japanese-latex-mode)
210(setq japanese-LaTeX-default-style "jsarticle")
211(setq japanese-TeX-command-default "pTeX")
212(setq japanese-LaTeX-command-default "pLaTeX")
213
214;;; git-status
215(require 'git)
216(autoload 'git-blame-mode "git-blame"
217  "Minor mode for incremental blame for Git." t)
218(add-to-list 'vc-handled-backends 'GIT)
219(global-set-key "\C-cg" 'git-status)
220
221;;; gnuserv
222(when window-system
223  (require 'gnuserv-compat)
224  (gnuserv-start))
225
226;;; Local Variables:
227;;; mode: emacs-lisp
228;;; indent-tabs-mode: nil
229;;; End:
230;;; end of file
Note: See TracBrowser for help on using the browser.