;; dot.emacs for Meadow-YaTeX-Dviout on Windows XP
;; This file is compiled by Tatsuya YANAGIDA.
;; last modified: 10 JUL 2005
;; Status: OK
;; my settings
;; word-count-mode settings --------
(setq load-path (cons (expand-file-name "~/elisp") load-path))
(autoload 'word-count-mode "word-count"
"Minor mode to count words." t nil)
(global-set-key "\M-+" 'word-count-mode)
(setq word-count-non-character-regexp "[\n\t ]")
(setq word-count-word-regexp "[a-z0-9_-]+")
(setq word-count-non-line-regexp "^[\t ]*\n\\|^[\t ]+$")
;;;; browse-kill-ring settings ----------
;;; source http://www.bookshelf.jp/soft/meadow_32.html#SEC444 ;;;;;
(require 'browse-kill-ring)
(global-set-key "\M-y" 'browse-kill-ring)
;; showing in one line.
;(setq browse-kill-ring-display-style 'one-line)
;; kill buffer when quit
;(setq browse-kill-ring-quit-action 'kill-and-delete-window)
;; highlight the current selection
;(setq browse-kill-ring-highlight-current-entry t)
;; ;;; Mule-UCS
;; ;; ftp://ftp.m17n.org/pub/mule/Mule-UCS/
;; ;; (set-language-environment)
;; (require 'un-define)
;; (setq bitmap-alterable-charset 'tibetan-1-column)
;; (require 'jisx0213)
;;------------------------------------------------------------------
;; +++ Window Size +++ ;;
;; source: http://chaosweb.complex.eng.hokudai.ac.jp/~hagi/contents/files/meadow199.el
(global-set-key [M-left] 'shrink-window-horizontally)
(global-set-key [M-right] 'enlarge-window-horizontally)
(global-set-key [M-up] 'enlarge-window)
(global-set-key [M-down] 'shrink-window)
;; Window [S-[up,down,left,right]]
(windmove-default-keybindings)
;; Fonts ------------------------------------
;; font-lock
(setq global-font-lock-mode t)
;; Speeding up loading files with use font-lock mode (only effective for emacs21)
(setq font-lock-support-mode 'jit-lock-mode)
;; +++ Syntax-highlighting for LaTeX mode +++ ;;
;;; The followings are my own colour for syntax-highlighting.
;;; The lines added by 03/01/04
(add-hook 'font-lock-mode-hook '(lambda ()
;; comment
(set-face-foreground 'font-lock-comment-face "maroon1") ;firebrick1, orange red,indian red,maroon1,violetred3, maroon2, lightsalmon2
;; other candiates: darkred, firebrik1-4,violetred,
(set-face-background 'font-lock-comment-face nil)
(set-face-bold-p 'font-lock-comment-face nil)
(set-face-italic-p 'font-lock-comment-face nil)
(set-face-underline-p 'font-lock-comment-face nil)
;;string
(set-face-foreground 'font-lock-string-face "green") ; cyan3, dark cyan
(set-face-background 'font-lock-string-face nil)
(set-face-bold-p 'font-lock-string-face nil)
(set-face-italic-p 'font-lock-string-face nil)
(set-face-underline-p 'font-lock-string-face nil)
;; keyword
(set-face-foreground 'font-lock-keyword-face "lemonchiffon4")
; other candidates: lemonchiffon4, spring green,green yellow, forest green, lawn green, light cyan, green4, darkgreen, cyan, turquoise, chartreuse,
(set-face-background 'font-lock-keyword-face nil)
(set-face-bold-p 'font-lock-keyword-face nil)
(set-face-italic-p 'font-lock-keyword-face nil)
(set-face-underline-p 'font-lock-keyword-face nil)
;; builtin -> \XXX for LaTeX
(set-face-foreground 'font-lock-builtin-face "deepskyblue");; mediumspringgreen, magenta4
;; other candiates: mediumseagreen, aquamarine, olivedrab, deeppink, magenta, darkorange
(set-face-background 'font-lock-builtin-face nil)
(set-face-bold-p 'font-lock-builtin-face nil)
(set-face-italic-p 'font-lock-builtin-face nil)
(set-face-underline-p 'font-lock-builtin-face nil)
;; function-name
(set-face-foreground 'font-lock-function-name-face "sandybrown")
; other candidates: blueviolet,
(set-face-background 'font-lock-function-name-face nil)
(set-face-bold-p 'font-lock-function-name-face nil)
(set-face-italic-p 'font-lock-function-name-face nil)
(set-face-underline-p 'font-lock-function-name-face nil)
;; variable-name
(set-face-foreground 'font-lock-variable-name-face "deepskyblue") ;green,BlueViolet
(set-face-background 'font-lock-variable-name-face nil)
(set-face-bold-p 'font-lock-variable-name-face nil)
(set-face-italic-p 'font-lock-variable-name-face nil)
(set-face-underline-p 'font-lock-variable-name-face nil)
;;type
(set-face-foreground 'font-lock-type-face "lemonchiffon4") ; mediumspringgreen
(set-face-background 'font-lock-type-face nil)
(set-face-bold-p 'font-lock-type-face nil)
(set-face-italic-p 'font-lock-type-face nil)
(set-face-underline-p 'font-lock-type-face nil)
;; constant
(set-face-foreground 'font-lock-constant-face "indianred") ;; indianRed
(set-face-background 'font-lock-constant-face nil)
(set-face-bold-p 'font-lock-constant-face t)
(set-face-italic-p 'font-lock-constant-face nil)
(set-face-underline-p 'font-lock-constant-face nil)
;; warning
(set-face-foreground 'font-lock-warning-face "Red3")
(set-face-background 'font-lock-warning-face nil)
(set-face-bold-p 'font-lock-warning-face nil)
(set-face-italic-p 'font-lock-warning-face nil)
(set-face-underline-p 'font-lock-warning-face nil)
))
(provide 'faces-font-lock)
;; display ---------------------------------
(cd "YOUR-WORKING-DIRECTORY")
;; Replace yes/no+enter prompts with y/n prompts
(fset 'yes-or-no-p 'y-or-n-p)
;; remove tool-bar
(tool-bar-mode 0)
;; Show line number on mode-line.
(line-number-mode t)
;; show column number on mode-line.
(column-number-mode t)
;; Move around windows with [S-[up, down, left, right]]
(windmove-default-keybindings)
;; Hilight marked region
(setq transient-mark-mode t)
(set-face-foreground 'region "white") ;originally: white
(set-face-background 'region "cornflower blue") ;dim gray,cyan, blue, navy, cornflower blue
;; highlight
(show-paren-mode t)
;;
(setq default-frame-alist
(append (list '(foreground-color . "grey90")
'(background-color . "darkslategrey") ; LemonChiffon
'(background-color . "gray")
'(border-color . "black")
'(mouse-color . "yellow") ; white
'(cursor-color . "yellow")
;; '(ime-font . (w32-logfont ""
;; 0 16 400 0 nil nil nil
;; 128 1 3 49)) ; TrueType
;; '(font . "bdf-fontset") ; BDF
'(font . "private-fontset"); TrueType
'(width . 125)
'(height . 42)
'(top . 10)
'(left . 1))
default-frame-alist))
;;
;;; source: http://chaosweb.complex.eng.hokudai.ac.jp/~hagi/contents/files/meadow199.el
(defvar dired-mode-p nil)
(add-hook 'dired-mode-hook
(lambda ()
(make-local-variable 'dired-mode-p)
(setq dired-mode-p t)))
(setq frame-title-format-orig frame-title-format)
(setq frame-title-format
'((buffer-file-name "%f"
(dired-mode-p default-directory
mode-line-buffer-identification))))
;; coding-system
(defun show-buffer-file-coding-system ()
(interactive)
(message "%s" buffer-file-coding-system)
)
;; html -------------------------------------------------------------------
;; html-helper-mode
(autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t)
(setq auto-mode-alist (cons '("\\.html$" . html-helper-mode) auto-mode-alist))
;; fonthtml
(setq load-path (cons "e:/home/tatsuya/emacs/site-lisp/html-helper-mode/" load-path))
(add-hook 'html-helper-load-hook
(function (lambda () (load "fonthtml.elc"))))
;;----------------------------------------------------------------------------
;; Yatex
;; Yatex will be autolatically loaded when opening *.tex file.
(setq auto-mode-alist
(cons (cons "\\.tex$" 'yatex-mode) auto-mode-alist))
(autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
;; Kanji code (Linux) 1. JIS shift 2. JIS 3.EUC
(setq YaTeX-kanji-code 1)
;; type-setter
(setq tex-command "c:/usr/bin/platex.exe")
;; viewer
;(setq dvi2-command "xdvi -s 4")
;(setq dvi2-command "gs")
(setq dvi2-command "c:/dviout/dviout.exe")
;; Additional syntax hilighting for YaTeX
(setq my-YaTeX-font-lock-keywords
'(("\\(\\\\\\(left\\|right\\)\\([][().|]\\|\\\\[{}]\\)\\)"
(0 font-lock-warning-face))
("\\(|\\|&\\|\\\\[{}]\\|\\\\\\\\\\)" (0 font-lock-warning-face))
("\\\\[a-zA-Z]*" (0 font-lock-builtin-face))
))
(add-hook 'yatex-mode-hook
'(lambda ()
(setq
YaTeX-font-lock-keywords
(append YaTeX-font-lock-keywords my-YaTeX-font-lock-keywords))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; for gb4e ;;
(setq yatex-mode-load-hook
'(lambda() (YaTeX-define-begend-key "x" "exe")))
;; diary and calendar----------------------
(display-time)
(setq european-calendar-style t)
;(calendar)
(setq mark-diary-entries-in-calendar t)
(setq view-calendar-holidays-initially t)
;(diary)
;; end of my settings-----------------------------------
;;;
(set-language-environment "Japanese")
;;; IME
(mw32-ime-initialize)
(setq default-input-method "MW32-IME")
(setq-default mw32-ime-mode-line-state-indicator "[--]")
(setq mw32-ime-mode-line-state-indicator-list '("[--]" "[あ]" "[--]"))
(add-hook 'mw32-ime-on-hook
(function (lambda () (set-cursor-height 2))))
(add-hook 'mw32-ime-off-hook
(function (lambda () (set-cursor-height 4))))
;; ;;;
;; ;; (set-cursor-type 'box) ; Meadow-1.10
;; ;; (set-cursor-type 'hairline-caret) ;
;;;
(setq w32-hide-mouse-on-key t)
(setq w32-hide-mouse-timeout 5000)
;;; font-lock
(global-font-lock-mode t)
;;; TrueType
(create-fontset-from-request "private-fontset"
'((width . 8)
(height . 16)
(fixed . t)
(italic . nil))
'((family . "MSゴシック")
(family . "Times New Roman")))
;; (change-fontset-from-request "private-fontset"
;; '((width . 8)
;; (height . 16)
;; (fixed . t)
;; (weight . 700)
;; (italic . nil))
;; '((family . "")
;; (family . "Courier New"))
;; 1)
;;
;; ;;; BDF
;;
;; ;;; shell
;; ;;; Cygwin
(setq explicit-shell-file-name "bash.exe")
(setq shell-file-name "sh.exe")
(setq shell-command-switch "-c")
(modify-coding-system-alist 'process ".*sh\\.exe" '(undecided-dos . euc-japan))
;; ;;; Virtually UN*X
;; (setq explicit-shell-file-name "tcsh.exe")
;; (setq shell-file-name "tcsh.exe")
;; (setq shell-command-switch "-c")
;; ;;; WindowsNT
;; (setq explicit-shell-file-name "CMD.EXE")
;; (setq shell-file-name "CMD.EXE")
;; (setq shell-command-switch "\\/c")
;;; argument-editing
(require 'mw32script)
(mw32script-init)
(setq exec-suffix-list '(".exe" ".sh" ".pl"))
(setq shell-file-name-chars "~/A-Za-z0-9_^$!#%&{}@`'.:()-")
;; ;;; browse-url
(global-set-key [S-mouse-2] 'browse-url-at-mouse)
;; ;
;; ;;
;; ;;
;; ;; notepad
;; (define-process-argument-editing "notepad"
;; (lambda (x) (general-process-argument-editing-function x nil t)))
;;
;; (defun w32-print-region (start end
;; &optional lpr-prog delete-text buf display
;; &rest rest)
;; (interactive)
;; (let ((tmpfile (convert-standard-filename (buffer-name)))
;; (w32-start-process-show-window t)
;; ;;
;; ;;
;; (coding-system-for-write w32-system-coding-system))
;; (while (string-match "[/\\]" tmpfile)
;; (setq tmpfile (replace-match "_" t nil tmpfile)))
;; (setq tmpfile (expand-file-name (concat "_" tmpfile "_")
;; temporary-file-directory))
;; (write-region start end tmpfile nil 'nomsg)
;; (call-process "notepad" nil nil nil "/p" tmpfile)
;; (and (file-readable-p tmpfile) (file-writable-p tmpfile)
;; (delete-file tmpfile))))
;;
;; (setq print-region-function 'w32-print-region)
;;;
;;; end of file
;;;
Last modified: Fri Sep 30 12:08:27 EST 2005