(set-language-environment 'Japanese) ;(require 'un-define) ;(require 'un-tools) ;;(load-library "ecmascript-mode") (autoload 'javascript-mode "javascript-mode" "JavaScript mode" t) (setq auto-mode-alist (append '(("\\.js$" . javascript-mode)) auto-mode-alist)) (require 'yaml-mode) (add-to-list 'auto-mode-alist '("\\.yaml$" . yaml-mode)) (require 'puppet-mode) (add-to-list 'auto-mode-alist '("\\.pp$" . puppet-mode)) ;;python-mode ;;(setq auto-mode-alist ;; (cons '("\\.py$" . python-mode) auto-mode-alist)) ;;(autoload 'python-mode "python-mode" "Python editing mode." t) ;;(add-to-list 'auto-mode-alist '("\\.js\\'" . javascript-mode)) ;;(autoload 'javascript-mode "javascript" nil t) ;;(setq javascript-indent-level 4) (autoload 'css-mode "css-mode") (setq auto-mode-alist (cons '("\\.css$" . css-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.js$" . javascript-mode) auto-mode-alist)) (setq cssm-indent-function #'cssm-c-style-indenter) ;; Wanderlust (autoload 'wl "wl" "Wanderlust" t) (autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t) ;; SEMI/tm を使うための設定 (setq mime-setup-enable-inline-html nil) (load "mime-setup") (setq mime-edit-split-message nil) ;;php-mode (load-library "php-mode") (require 'php-mode) (add-hook 'php-mode-user-hook '(lambda () (setq tab-width 4) (setq c-basic-offset 4) (setq indent-tabs-mode nil) ) ) ;; IME (mw32-ime-initialize) (setq default-input-method "MW32-IME") ;; Color mode ;;(require 'hilit19) (global-font-lock-mode 1) ;; coding system (set-default-coding-systems 'euc-jp-unix) ;; 自動セーブ設定 (setq auto-save-defalut nil) ; disable auto-saving (setq make-backup-files nil) ; don't make *~ (setq auto-save-list-file-prefix nil) ; don't make ~/.sav ;;(load "cc-mode") (w32-add-font "tt-font" '((strict-spec ((:char-spec ascii :height any) (w32-logfont "Courier New" 10 20 400 0 nil nil nil 0 1 3 49)) ((:char-spec ascii :height any :weight bold) (w32-logfont "Courier New" 11 20 700 0 nil nil nil 0 1 3 49)) ((:char-spec ascii :height any :slant italic) (w32-logfont "Courier New" 11 20 400 0 t nil nil 0 1 3 49)) ((:char-spec ascii :height any :weight bold :slant italic) (w32-logfont "Courier New" 11 20 700 0 t nil nil 0 1 3 49)) ((:char-spec japanese-jisx0208 :height any) (w32-logfont "MS ゴシック" 0 20 400 0 nil nil nil 128 1 3 49)) ((:char-spec japanese-jisx0208 :height any :weight bold) (w32-logfont "MS ゴシック" 0 20 700 0 nil nil nil 128 1 3 49) ((spacing . -1))) ((:char-spec japanese-jisx0208 :height any :slant italic) (w32-logfont "MS ゴシック" 0 20 400 0 t nil nil 128 1 3 49)) ((:char-spec japanese-jisx0208 :height any :weight bold :slant italic) (w32-logfont "MS ゴシック" 0 20 700 0 t nil nil 128 1 3 49) ((spacing . -1)))))) (set-face-attribute 'variable-pitch nil :family "Courier New" :height 0.9) (setq default-frame-alist (append (list '(foreground-color . "#cccccc") '(background-color . "#080808") '(border-color . "black") '(mouse-color . "#473db8") '(cursor-color . "#888888") '(width . 88) '(height . 45);small-fontset '(top . 40) '(left . 350) '(font . "tt-font") '(vertical-scroll-bars . right)) default-frame-alist)) (set-face-background 'modeline "#272d58") ;; IME利用時のカーソル色 (add-hook 'mw32-ime-on-hook (function (lambda () (set-cursor-color "#473db8")))) (add-hook 'mw32-ime-off-hook (function (lambda () (set-cursor-color "#888888")))) ;; for perl (defalias 'perl-mode 'cperl-mode) (custom-set-variables '(cperl-close-paren-offset -4) '(cperl-continued-statement-offset 4) '(cperl-indent-level 4) '(cperl-indent-parens-as-block t) '(cperl-tab-always-indent t) ) (setq-default indent-tabs-mode nil) (global-set-key "%" 'match-paren) (defun match-paren (arg) "Go to the matching paren if on a paren; otherwise insert %." (interactive "p") (let ((prev-char (char-to-string (preceding-char))) (next-char (char-to-string (following-char)))) (cond ((string-match "[[{(<]" next-char) (forward-sexp 1)) ((string-match "[\]})>]" prev-char) (backward-sexp 1)) (t (self-insert-command (or arg 1)))))) (add-hook 'cperl-mode-hook '(lambda () (make-face 'cperl-nonverridable-face) (set-face-foreground 'cperl-nonoverridable-face "DimGray") (setq cperl-nonoverridable-face 'cperl-nonoverridable-face) (make-face 'cperl-hash-face) (set-face-foreground 'cperl-hash-face "#cccccc") (setq cperl-hash-face 'cperl-hash-face) (make-face 'cperl-array-face) (set-face-foreground 'cperl-array-face "#cccccc") (setq cperl-array-face 'cperl-array-face) )) (add-hook 'cperl-mode-hook 'outline-minor-mode) ;(iswitchb-default-keybindings) ;; ruby mode (autoload 'ruby-mode "ruby-mode" "Mode for editing ruby source files" t) (setq auto-mode-alist (append '(("\\.rb$" . ruby-mode)) auto-mode-alist)) (setq interpreter-mode-alist (append '(("ruby" . ruby-mode)) interpreter-mode-alist)) (autoload 'run-ruby "inf-ruby" "Run an inferior Ruby process") (autoload 'inf-ruby-keys "inf-ruby" "Set local key defs for inf-ruby in ruby-mode") (add-hook 'ruby-mode-hook '(lambda () (inf-ruby-keys))) (global-font-lock-mode 1) (setq default-frame-alist (append '((foreground-color . "gray") ; (background-color . "black") ; (cursor-color . "blue") ; ) default-frame-alist)) ;;(require 'uniquify) ;;(setq uniquify-buffer-name-style 'post-forward-angle-brackets) ;;(global-set-key "\C-x\C-i" 'indent-region) ;;(setq completion-ignore-case t) ;;(add-hook 'after-save-hook 'my-chmod-script) ;;(defun my-chmod-script() (interactive) (save-restriction (widen) ;; (let ((name (buffer-file-name))) ;; (if (and (not (string-match ":" name)) ;; (not (string-match "/\\.[^/]+$" name)) ;; (equal "#!" (buffer-substring 1 (min 3 (point-max))))) ;; (progn (set-file-modes name (logior (file-modes name) 73)) ;; (message "Wrote %s (chmod +x)" name) ;; )) ;;))) (setq scroll-step 1) (show-paren-mode t) (transient-mark-mode t) ;; trac-wiki mode (require 'trac-wiki) (setq trac-projects '( ("puppet" :endpoint "http://trac.mizzy.org/puppet/login/xmlrpc") ("public" :endpoint "http://trac.mizzy.org/public/login/xmlrpc") ("assurer" :endpoint "http://assurer.jp/trac/login/xmlrpc") )) ;; pukiwki mode (setq pukiwiki-auto-insert t) (autoload 'pukiwiki-edit "pukiwiki-mode" "pukwiki-mode." t) (autoload 'pukiwiki-index "pukiwiki-mode" "pukwiki-mode." t) (autoload 'pukiwiki-edit-url "pukiwiki-mode" "pukwiki-mode." t) (setq pukiwiki-site-list '(("mizzy.org" "http://mizzy.org/pukiwiki/index.php" nil euc-jp-dos) )) (require 'w3m-load) ;; perltidy (defun perltidy-region () "Run perltidy on the current region." (interactive) (save-excursion (shell-command-on-region (point) (mark) "perltidy -q" nil t))) (defun perltidy-defun () "Run perltidy on the current defun." (interactive) (save-excursion (mark-defun) (perltidy-region))) (require 'html-tt) (add-hook 'sgml-mode-hook 'html-tt-load-hook) (make-face 'my-sequence-face) (set-face-foreground 'my-sequence-face "lightgreen") (setq html-tt-sequence-face 'my-sequence-face) (iswitchb-mode 1) (require 'uniquify) (setq uniquify-buffer-name-style 'post-forward-angle-brackets)