;;; GNU Emacs initialization file ;; Copyright (C) 2014, 2017 Yuji Minejima ;; Author: Yuji Minejima ;; This file is NOT part of GNU Emacs. ;; This program is in the public domain. ;; 日本語環境と文字コードの設定 (set-language-environment "Japanese") (set-default-coding-systems 'utf-8) (prefer-coding-system 'utf-8) ;;(set-keyboard-coding-system 'utf-8) ;;(global-set-key [kanji] 'toggle-input-method) ;; 標準以外のEmacs Lispパッケージのあるディレクトリを指定 (add-to-list 'load-path (expand-file-name "~/.emacs.d/elisp")) (add-to-list 'load-path (expand-file-name "~/.emacs.d/elisp/mcomplete")) (add-to-list 'load-path (expand-file-name "~/islelisp")) ;; 固定等幅フォント (set-face-attribute 'fixed-pitch nil :family "MyricaM M") ;; 可変幅フォント (set-face-attribute 'variable-pitch nil :family "Yu Gothic UI") (add-to-list 'default-frame-alist '(font . "MyricaM M-13")) (set-face-font 'font-lock-comment-face "MyricaM M-13") (set-face-font 'font-lock-string-face "MyricaM M-13") (set-face-font 'font-lock-keyword-face "MyricaM M-13") (set-face-font 'font-lock-builtin-face "MyricaM M-13") (set-face-font 'font-lock-function-name-face "MyricaM M-13") (set-face-font 'font-lock-variable-name-face "MyricaM M-13") (set-face-font 'font-lock-type-face "MyricaM M-13") (set-face-font 'font-lock-constant-face "MyricaM M-13") (set-face-font 'font-lock-warning-face "MyricaM M-13") ;;; ;;; ice's settings on 04/10/19 ===== [Start] ===== o ===== o ===== o ===== ;;; ;; ------------------------------------------------------------------------ ;; @ ime ;; Windows IME (setq default-input-method "W32-IME") ;; (setq-default w32-ime-mode-line-state-indicator "[--]") ;; (setq w32-ime-mode-line-state-indicator-list '("[--]" "[あ]" "[--]")) (setq-default w32-ime-mode-line-state-indicator "[Aa]") (setq w32-ime-mode-line-state-indicator-list '("[Aa]" "[あ]" "[Aa]")) (w32-ime-initialize) ;; 日本語入力時にカーソルの色を変える設定 ;;; (add-hook 'w32-ime-on-hook '(lambda () (set-cursor-color "coral4"))) (add-hook 'w32-ime-on-hook '(lambda () (set-cursor-color "red"))) (add-hook 'w32-ime-off-hook '(lambda () (set-cursor-color "black"))) ;; ミニバッファに移動した際は最初に日本語入力が無効な状態にする (add-hook 'minibuffer-setup-hook 'deactivate-input-method) ;; isearch に移行した際に日本語入力を無効にする (add-hook 'isearch-mode-hook '(lambda () (deactivate-input-method) (setq w32-ime-composition-window (minibuffer-window)))) (add-hook 'isearch-mode-end-hook '(lambda () (setq w32-ime-composition-window nil))) ;; helm 使用中に日本語入力を無効にする (advice-add 'helm :around '(lambda (orig-fun &rest args) (let ((select-window-functions nil) (w32-ime-composition-window (minibuffer-window))) (deactivate-input-method) (apply orig-fun args)))) ;;; ------------------------------------------------------------------------ ;;; 日本語中の全角空白やタブを強調して表示 by ice 02/25/15 ;;; (require 'whitespace) ;;; (set-face-foreground 'whitespace-space "DarkGoldenrod1") (set-face-foreground 'whitespace-space "deepskyblue") (set-face-background 'whitespace-space nil) (set-face-bold-p 'whitespace-space t) (set-face-foreground 'whitespace-tab "DarkOliveGreen1") (set-face-background 'whitespace-tab nil) (set-face-underline 'whitespace-tab t) (setq whitespace-style '(face tabs tab-mark spaces space-mark)) (setq whitespace-space-regexp "\\(\x3000+\\)") (setq whitespace-display-mappings '((space-mark ?\x3000 [?\□]) (tab-mark ?\t [?\xBB ?\t]) )) (global-whitespace-mode 1) ; 全角スペースを常に表示 ;(global-set-key (kbd "C-x w") 'global-whitespace-mode) ; 全角スペース表示の切替 ;;; ===== (eval-after-load "holidays" '(progn (require 'japanese-holidays) ;; (setq calendar-holidays ; 他の国の祝日も表示させたい場合は適当に調整 ;; (append japanese-holidays holiday-local-holidays holiday-other-holidays)) (setq mark-holidays-in-calendar t) ; 祝日をカレンダーに表示 ;; 土曜日・日曜日を祝日として表示する場合、以下の設定を追加します。 ;; デフォルトで設定済み (setq japanese-holiday-weekend '(0 6) ; 土日を祝日として表示 japanese-holiday-weekend-marker ; 土曜日を水色で表示 '(holiday nil nil nil nil nil japanese-holiday-saturday)) (add-hook 'calendar-today-visible-hook 'japanese-holiday-mark-weekend) (add-hook 'calendar-today-invisible-hook 'japanese-holiday-mark-weekend))) ;; “きょう”をマークするには以下の設定を追加します。 (add-hook 'calendar-today-visible-hook 'calendar-mark-today) ;; (add-hook 'calendar-load-hook ;; (lambda () ;; (require 'japanese-holidays) ;; (setq calendar-holidays ;; (append japanese-holidays local-holidays other-holidays)))) ;; (setq mark-holidays-in-calendar t) ;; ;; “きょう”をマークするには以下の設定を追加します。 ;; (add-hook 'today-visible-calendar-hook 'calendar-mark-today) ;; 日曜日を赤字にする場合、以下の設定を追加します。 ;; (setq calendar-weekend-marker 'diary) ;; (add-hook 'today-visible-calendar-hook 'calendar-mark-weekend) ;; (add-hook 'today-invisible-calendar-hook 'calendar-mark-weekend) ;;; ツールバーを非表示にする ;; M-x tool-bar-mode でも切り替え可能 (tool-bar-mode -1) ;;; (勝手に)インデンテーションをさせない (electric-indent-mode -1) ;;; ;;; ice's settings on 04/10/19 ===== [End] ===== o ===== o ===== o ===== ;;; ;; 行間の設定 (setq-default line-spacing 2) ;;; Frame size & position (setq default-frame-alist (append (list ;;'(foreground-color . "black") ;;'(background-color . "LemonChiffon") ;;'(background-color . "gray") ;;'(border-color . "black") ;;'(mouse-color . "white") ;;'(cursor-color . "black") '(width . 80) '(height . 40) '(top . 0) '(left . 570) ) default-frame-alist)) ;; 0でツールバーを非表示 ;;(tool-bar-mode 0) ;; Msys2などによる各種Unixコマンドのinfo形式のマニュアルがあるディレクトリを追加 ;;;(setq Info-default-directory-list (cons "c:/msys64/usr/share/info" Info-default-directory-list)) ;;; "global key binding" ;;(global-set-key [(delete)] 'delete-char) ;;(global-set-key "\C-x\C-q" 'toggle-read-only) ;;;(global-set-key [?\C-x ?\C-2] 'split-window-vertically) ;;; ;;;(global-set-key "\C-xk" 'bm-kill-current-buffer) ;;;(global-set-key "\C-xE" 'bm-exec-script-buffer) ;;;(global-set-key "\C-x\M-e" 'eval-buffer) ;;;(global-set-key "\M-]" 'delete-other-windows) ;;;(global-set-key "\M-d" 'bm-delete-token) ;;; ;;;(define-key ctl-x-map "F" 'find-function) ;;;(define-key ctl-x-4-map "F" 'find-function-other-window) ;;;(define-key ctl-x-5-map "F" 'find-function-other-frame) ;;;(define-key ctl-x-map "K" 'find-function-on-key) ;;;(define-key ctl-x-map "V" 'find-variable) ;;;(define-key ctl-x-4-map "V" 'find-variable-other-window) ;;;(define-key ctl-x-5-map "V" 'find-variable-other-frame) ;;; C-, で自分用のコマンドが起動する ;;(let ((map (make-sparse-keymap))) ;; (global-set-key [(control ?,)] map) ;; ;; (define-key map "=" 'bm-show-code-mode) ;; (define-key map "e" 'bm-find-elisp-symbol) ;; (define-key map "\C-e" 'bm-find-elisp-file) ;; (define-key map "p" 'bm-perl-find) ;; (define-key map "P" 'bm-perl-grep-perldoc) ;; (define-key map "c" 'iman) ;; (define-key map "r" 'bm-rfc-find) ;; (define-key map "y" 'bm-syntax-show-descriptor) ;; (define-key map "b" 'bookmark-jump) ;; (define-key map "v" 'quick-calc) ;; (define-key map "j" 'goto-line) ;; (define-key map "l" '(lambda () (interactive) (recenter 0))) ;; (define-key map "\C-l" '(lambda () (interactive) (recenter -1))) ;; (define-key map "a" 'bm-insert-info-link) ;; (define-key map "n" 'bm-goto-link) ;; (define-key map "s" 'bm-shell) ;; (define-key map "8" 'bm-tab8) ;; (define-key map "4" 'bm-tab4) ;; (define-key map "0" 'bm-kill-buffer-and-window) ;; (define-key map "i" 'bm-right-justify-from-here) ;; (define-key map "h" 'hyperspec-lookup) ;; (define-key map "d" 'islisp-hyperdraft) ;; ) ;; インデントにタブ文字を使わずスペースを使う (setq-default indent-tabs-mode nil) ;;; Minor modes, buffer local options ;;(setq auto-mode-alist ;; (cons '("\\.\\(xml\\|xsl\\|rng\\|xhtml\\|html\\)\\'" . nxml-mode) ;; auto-mode-alist)) ;;; mcomplete 峯島作のミニバッファの補完パッケージ ;; https://github.com/nenbutsu/mcomplete ;;(require 'mcomplete) ;;(turn-on-mcomplete-mode) ;;(require 'completing-help) ;;(turn-on-completing-help-mode) (require 'eldoc) ;; emacs-lisp-mode (add-hook 'emacs-lisp-mode-hook #'(lambda () ;;;(show-paren-mode t) (setq indent-tabs-mode nil) ; don't use tabs for indentations (define-key emacs-lisp-mode-map [return] 'newline-and-indent) (eldoc-mode t))) ;; lisp-interaction-mode ;;(add-hook 'lisp-interaction-mode-hook ;; #'(lambda () ;; ;;;(show-paren-mode t) ;; (define-key lisp-interaction-mode-map ;; [return] 'newline-and-indent) ;; (eldoc-mode t))) ;; Bookmarks ;;(setq bookmark-sort-flag nil) ;; hyperspec ;;(eval-after-load "hyperspec" '(load "hyperspec-addon")) ;;(require 'hyperspec) ;;(setq common-lisp-hyperspec-root "file:///C:/Program%20Files%20%28x86%29/LispWorks/lib/6-1-0-0/manual/online/CLHS/") ;;(require 'hyperdraft) ;;(setq browse-url-browser-function 'browse-url-firefox) ;;;(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. ;;; '(c-default-style ;;; (quote ;;; ((c-mode . "K&R") ;;; (java-mode . "java") ;;; (awk-mode . "awk") ;;; (other . "gnu"))))) ;;;(put 'upcase-region 'disabled nil) ;;;(put 'narrow-to-region 'disabled nil) ;;;(put 'downcase-region 'disabled nil)