;;; -*- mode: emacs-lisp; syntax: elisp -*- ;;; ;;; .emacs.el ;;; (setenv "LANG" "C") (setenv "TZ" "JST-9") (setenv "RCSINIT" "-z+09:00") ;;; cygwin "df" always checks the floppy drives, which is annoying ;;; in the dired mode. (setq directory-free-space-program nil) ;;; misc settings (setq tooltip-use-echo-area t) (blink-cursor-mode nil) (setq next-line-add-newlines t) (setq ls-lisp-dirs-first t) (setq resize-mini-windows nil) (setq cursor-in-non-selected-windows nil) (auto-image-file-mode) (setq-default line-spacing 0) (setq default-frame-alist (cons '(cursor-type . box) default-frame-alist)) (setq visible-bell t) (menu-bar-mode 0) (if window-system (progn (tool-bar-mode 0) (scroll-bar-mode nil))) ;;; font-lock-mode (setq default-frame-alist (append '((font . "fontset-12")) default-frame-alist)) (global-font-lock-mode t) ;;; japanese environment (input method, encoding, and fonts) (set-language-environment "Japanese") (set-default-coding-systems 'sjis) (set-keyboard-coding-system 'sjis) (set-terminal-coding-system 'sjis) (setq network-coding-system-alist '(("nntp" . (junet-unix . junet-unix)) (110 . (no-conversion . no-conversion)) (25 . (no-conversion . no-conversion)))) ;;; no need for mule-ucs! (utf-translate-cjk-mode 1) ;;; ime (if (not (null window-system)) (progn (setq default-input-method "japanese-egg-canna") (setq canna-hostname "localhost") (setq its-hira-comma ",") (setq its-hira-period "。") (load-library "egg"))) ;;; shell (setq exec-path (mapcar 'expand-file-name (list "~/bin" "/usr/local/bin" "/usr/bin" "/bin" "/usr/X11R6/bin" ))) (setenv "MAKE_MODE" "unix") (setenv "MANPATH" "/usr/local/netpbm/man:/usr/local/man:/usr/X11R6/man:/usr/share/man:/usr/man") (setq explicit-shell-file-name "bash") ;;; clipboard (global-set-key "\C-cw" 'cb-copy) (global-set-key "\C-cy" 'cb-paste) (defun cb-copy () (interactive) (let ((coding-system-for-write 'shift_jis-dos)) (shell-command-on-region (region-beginning) (region-end) "cat > /dev/clipboard" nil nil nil)) (message "")) (defun cb-paste () (interactive) (let ((coding-system-for-read 'shift_jis-dos)) (goto-char (+ (point) (cadr (insert-file-contents "/dev/clipboard")))))) ;;; emacsclient (server-start) ;;; make splash-screen visible, which is not shown if server-start is ;;; used. please refer ;;; http://tsukuba.m17n.org/mule-ja-archive/2002-3/msg00006.html. (add-hook 'emacs-startup-hook '(lambda nil (if (and (string-equal "*scratch*" (buffer-name)) (zerop (buffer-size))) (display-splash-screen)))) ;;; custom (use M-x customize-option) (load-library "custom") (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. '(archive-zip-use-pkzip nil) '(auto-compression-mode t nil (jka-compr)) '(diff-switches "-u")) (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. ) (put 'narrow-to-region 'disabled nil)