Emacs 24.4の32 bit Windows版をそろそろ誰かがコンパイルしてくれたかと思い探したところ見つかった。
http://rubikitch.com/category/emacs-24-4/
さっそく推奨されている開発版をインストールして実行。新しいフォント、行番号、グレイなバックグラウンドにたじたじ。.emacs.d/init.elの中のエントリを順番に削除して、ようやく好みの画面になった。フォント(Migu 1M)はしばらくこれを使うことにする。
org-modeがアイデアプロセッサみたいで、インデントや箇条書きの番号を付けてくれるみたいだが、gin-modeのように最終目的がテキストファイルの作成ではないので目的にはあわない。gin-modeみたいなものでさらに項目番号を振りなおしてくれるようなものがないのかはまだこれから探さないといけない。以下は、本日の init.el。
<link href="'http://alexgorbatchev.com/pub/sh/current/styles/shCore.css'" rel="'stylesheet'" type="'text/css'"/>
<link href="'http://alexgorbatchev.com/pub/sh/current/styles/shThemeMidnight.css'" rel="'stylesheet'" type="'text/css'"/>
<script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js'" type="'text/javascript'"></script>
<script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushAS3.js'" type="'text/javascript'"></script>
<script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushBash.js'" type="'text/javascript'"></script>
<script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushErlang.js'" type="'text/javascript'"></script>
<script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJavaFX.js'" type="'text/javascript'"></script>
<script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js'" type="'text/javascript'"></script>
<script language="javascript" type="text/javascript">
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.all();
</script>
http://rubikitch.com/category/emacs-24-4/
さっそく推奨されている開発版をインストールして実行。新しいフォント、行番号、グレイなバックグラウンドにたじたじ。.emacs.d/init.elの中のエントリを順番に削除して、ようやく好みの画面になった。フォント(Migu 1M)はしばらくこれを使うことにする。
org-modeがアイデアプロセッサみたいで、インデントや箇条書きの番号を付けてくれるみたいだが、gin-modeのように最終目的がテキストファイルの作成ではないので目的にはあわない。gin-modeみたいなものでさらに項目番号を振りなおしてくれるようなものがないのかはまだこれから探さないといけない。以下は、本日の init.el。
<link href="'http://alexgorbatchev.com/pub/sh/current/styles/shCore.css'" rel="'stylesheet'" type="'text/css'"/>
<link href="'http://alexgorbatchev.com/pub/sh/current/styles/shThemeMidnight.css'" rel="'stylesheet'" type="'text/css'"/>
<script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js'" type="'text/javascript'"></script>
<script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushAS3.js'" type="'text/javascript'"></script>
<script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushBash.js'" type="'text/javascript'"></script>
<script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushErlang.js'" type="'text/javascript'"></script>
<script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJavaFX.js'" type="'text/javascript'"></script>
<script src="'http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js'" type="'text/javascript'"></script>
<script language="javascript" type="text/javascript">
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.all();
</script>
;;; .emacs --- dot emacs file ;; This file is NOT part of GNU Emacs. ;; This file is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation; either version 2 of ;; the License, or (at your option) any later version. ;; This file is distributed in the hope that it will be ;; useful, but WITHOUT ANY WARRANTY; without even the implied ;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ;; PURPOSE. See the GNU General Public License for more details. ;; You should have received a copy of the GNU General Public ;; License along with this file; if not, write to the Free ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, ;; MA 02111-1307, USA. ;;; Code: ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ site-lisp ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; (let ( (default-directory (file-name-as-directory (concat user-emacs-directory "site-lisp"))) ) (add-to-list 'load-path default-directory) (normal-top-level-add-subdirs-to-load-path) ) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ language - coding system ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; デフォルトの文字コード (set-default-coding-systems 'utf-8-unix) ;; テキストファイル/新規バッファの文字コード (prefer-coding-system 'utf-8-unix) ;; ファイル名の文字コード (set-file-name-coding-system 'utf-8-unix) ;; キーボード入力の文字コード (set-keyboard-coding-system 'utf-8-unix) ;; サブプロセスのデフォルト文字コード (setq default-process-coding-system '(undecided-dos . utf-8-unix)) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ key binding - keyboard ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; Altキーを使用せずにMetaキーを使用 (setq w32-alt-is-meta nil) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ language - input method ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; モードラインの表示文字列 (setq-default w32-ime-mode-line-state-indicator "[Aa] ") (setq w32-ime-mode-line-state-indicator-list '("[Aa]" "[あ]" "[Aa]")) ;; IME初期化 (w32-ime-initialize) ;; デフォルトIME (setq default-input-method "W32-IME") ;; IME変更 (global-set-key (kbd "C-\\") 'toggle-input-method) ;; 漢字/変換キー入力時のエラーメッセージ抑止 (global-set-key (kbd "<A-kanji>") 'ignore) (global-set-key (kbd "<M-kanji>") 'ignore) (global-set-key (kbd "<kanji>") 'ignore) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ language - fontset ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; デフォルト フォント (set-face-attribute 'default nil :family "Migu 1M" :height 110) ;; プロポーショナル フォント (set-face-attribute 'variable-pitch nil :family "Migu 1M" :height 110) ;; 等幅フォント (set-face-attribute 'fixed-pitch nil :family "Migu 1M" :height 110) ;; ツールチップ表示フォント (set-face-attribute 'tooltip nil :family "Migu 1M" :height 90) ;;; fontset ;; フォントサイズ調整 (global-set-key (kbd "C-<wheel-up>") '(lambda() (interactive) (text-scale-increase 1))) (global-set-key (kbd " C-=") '(lambda() (interactive) (text-scale-increase 1))) (global-set-key (kbd "C-<wheel-down>") '(lambda() (interactive) (text-scale-decrease 1))) (global-set-key (kbd "C--") '(lambda() (interactive) (text-scale-decrease 1))) ;; フォントサイズ リセット (global-set-key (kbd "M-0") '(lambda() (interactive) (text-scale-set 0))) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ screen - frame ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; (setq default-frame-alist (append '((width . 85) ; フレーム幅 (height . 38 ) ; フレーム高 ;; (left . 70 ) ; 配置左位置 ;; (top . 28 ) ; 配置上位置 (line-spacing . 0 ) ; 文字間隔 (left-fringe . 10 ) ; 左フリンジ幅 (right-fringe . 11 ) ; 右フリンジ幅 (menu-bar-lines . 1 ) ; メニューバー (tool-bar-lines . 0 ) ; ツールバー (vertical-scroll-bars . 0 ) ; スクロールバー (scroll-bar-width . 17 ) ; スクロールバー幅 (cursor-type . box) ; カーソル種別 (alpha . 100) ; 透明度 ) default-frame-alist) ) (setq initial-frame-alist default-frame-alist) ;; フレーム タイトル (setq frame-title-format '("emacs " emacs-version (buffer-file-name " - %f"))) ;; 初期画面の非表示 (setq inhibit-startup-message nil) (setq inhibit-startup-screen nil) ;; フルスクリーン化 (global-set-key (kbd "<A-return>") 'toggle-frame-fullscreen) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ screen - mode line ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; ;; 行番号の表示 (line-number-mode nil) ;; 列番号の表示 (column-number-mode nil) ;; ;; モードライン カスタマイズ ;; (setq-default ;; mode-line-format ;; `( ;; "" ;; w32-ime-mode-line-state-indicator ;; " " ;; mode-line-mule-info ;; mode-line-modified ;; mode-line-frame-identification ;; mode-line-buffer-identification ;; " " ;; global-mode-string ;; " %[(" ;; mode-name ;; mode-line-process ;; "%n" ;; ")%] " ;; (which-func-mode ("" which-func-format " ")) ;; (line-number-mode ;; (:eval ;; (format "L%%l/L%d " (count-lines (point-max) 1) ))) ;; (column-number-mode " C%c ") ;; (-3 . "%p") ;; ) ;; ) (setq mode-line-frame-identification " ") ;; cp932エンコードの表記変更 (coding-system-put 'cp932 :mnemonic ?P) (coding-system-put 'cp932-dos :mnemonic ?P) (coding-system-put 'cp932-unix :mnemonic ?P) (coding-system-put 'cp932-mac :mnemonic ?P) ;; UTF-8エンコードの表記変更 (coding-system-put 'utf-8 :mnemonic ?U) (coding-system-put 'utf-8-with-signature :mnemonic ?u) ;; 改行コードの表記追加 (setq eol-mnemonic-dos ":Dos ") (setq eol-mnemonic-mac ":Mac ") (setq eol-mnemonic-unix ":Unx ") (setq eol-mnemonic-undecided ":??? ") ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ screen - buffer ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; バッファ画面外文字の切り詰め表示 (setq truncate-lines nil) ;; ウィンドウ縦分割時のバッファ画面外文字の切り詰め表示 (setq truncate-partial-width-windows t) ;; 同一バッファ名にディレクトリ付与 (require 'uniquify) (setq uniquify-buffer-name-style 'forward) (setq uniquify-buffer-name-style 'post-forward-angle-brackets) (setq uniquify-ignore-buffers-re "*[^*]+*") ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ screen - cursor ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; カーソルの点滅 (blink-cursor-mode 0) ;; 非アクティブウィンドウのカーソル表示 (setq-default cursor-in-non-selected-windows t) ;; IME無効/有効時のカーソルカラー定義 (unless (facep 'cursor-ime-off) (make-face 'cursor-ime-off) (set-face-attribute 'cursor-ime-off nil :background "DarkRed" :foreground "White") ) (unless (facep 'cursor-ime-on) (make-face 'cursor-ime-on) (set-face-attribute 'cursor-ime-on nil :background "DarkGreen" :foreground "White") ) ;; IME無効/有効時のカーソルカラー設定 (add-hook 'input-method-inactivate-hook '(lambda() (if (facep 'cursor-ime-off) (let ( (fg (face-attribute 'cursor-ime-off :foreground)) (bg (face-attribute 'cursor-ime-off :background)) ) (set-face-attribute 'cursor nil :foreground fg :background bg) ) ) ) ) (add-hook 'input-method-activate-hook '(lambda() (if (facep 'cursor-ime-on) (let ( (fg (face-attribute 'cursor-ime-on :foreground)) (bg (face-attribute 'cursor-ime-on :background)) ) (set-face-attribute 'cursor nil :foreground fg :background bg) ) ) ) ) ;; バッファ切り替え時の状態引継ぎ設定 (setq w32-ime-buffer-switch-p nil) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ screen - linum ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; ;; (require 'linum) ;; ;; ;; 行移動を契機に描画 ;; (defvar linum-line-number 0) ;; (declare-function linum-update-current "linum" ()) ;; (defadvice linum-update-current ;; (around linum-update-current-around activate compile) ;; (unless (= linum-line-number (line-number-at-pos)) ;; (setq linum-line-number (line-number-at-pos)) ;; ad-do-it ;; )) ;; ;; ;; バッファ中の行番号表示の遅延設定 ;; (defvar linum-delay nil) ;; (setq linum-delay t) ;; (defadvice linum-schedule (around linum-schedule-around () activate) ;; (run-with-idle-timer 1.0 nil #'linum-update-current)) ;; ;; ;; 行番号の書式 ;; (defvar linum-format nil) ;; (setq linum-format "%5d") ;; ;; ;; バッファ中の行番号表示 ;; (global-linum-mode t) ;; ;; ;; 文字サイズ ;; (set-face-attribute 'linum nil :height 0.75) ;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ screen - tabbar ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; (require 'tabbar) ;; tabbar有効化 ;;(call-interactively 'tabbar-mode t) (call-interactively 'tabbar-mode nil) ;; ボタン非表示 (dolist (btn '(tabbar-buffer-home-button tabbar-scroll-left-button tabbar-scroll-right-button)) (set btn (cons (cons "" nil) (cons "" nil))) ) ;; タブ切替にマウスホイールを使用(0:有効,-1:無効) (call-interactively 'tabbar-mwheel-mode -1) (remove-hook 'tabbar-mode-hook 'tabbar-mwheel-follow) (remove-hook 'mouse-wheel-mode-hook 'tabbar-mwheel-follow) ;; タブグループを使用(t:有効,nil:無効) (defvar tabbar-buffer-groups-function nil) (setq tabbar-buffer-groups-function nil) ;; タブの表示間隔 (defvar tabbar-separator nil) (setq tabbar-separator '(1.0)) ;; タブ切り替え (global-set-key (kbd "<C-tab>") 'tabbar-forward-tab) (global-set-key (kbd "C-q") 'tabbar-backward-tab) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ search - isearch ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; 大文字・小文字を区別しないでサーチ (setq-default case-fold-search nil) ;; インクリメント検索時に縦スクロールを有効化 (setq isearch-allow-scroll nil) ;; C-dで検索文字列を一文字削除 (define-key isearch-mode-map (kbd "C-d") 'isearch-delete-char) ;; C-yで検索文字列にヤンク貼り付け (define-key isearch-mode-map (kbd "C-y") 'isearch-yank-kill) ;; C-eで検索文字列を編集 (define-key isearch-mode-map (kbd "C-e") 'isearch-edit-string) ;; Tabで検索文字列を補完 (define-key isearch-mode-map (kbd "TAB") 'isearch-yank-word) ;; C-gで検索を終了 (define-key isearch-mode-map (kbd "C-g") '(lambda() (interactive) (isearch-done))) ;; 日本語の検索文字列をミニバッファに表示 (define-key isearch-mode-map (kbd "<compend>") '(lambda() (interactive) (isearch-update))) (define-key isearch-mode-map (kbd "<kanji>") 'isearch-toggle-input-method) (add-hook 'isearch-mode-hook '(lambda() (setq w32-ime-composition-window (minibuffer-window))) ) (add-hook 'isearch-mode-end-hook '(lambda() (setq w32-ime-composition-window nil)) ) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ screen - hiwin ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; (require 'hiwin) ;; hiwin-modeを有効化 (hiwin-activate) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ search - migemo ;;; ;;; https://github.com/emacs-jp/migemo ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; (require 'migemo) (defvar migemo-command nil) (setq migemo-command "cmigemo") (defvar migemo-options nil) (setq migemo-options '("-q" "--emacs")) (defvar migemo-dictionary nil) (setq migemo-dictionary "/usr/local/share/migemo/utf-8/migemo-dict") (defvar migemo-user-dictionary nil) (defvar migemo-regex-dictionary nil) (defvar migemo-coding-system nil) (setq migemo-coding-system 'utf-8-unix) (load-library "migemo") ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ file - backup ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; ファイルオープン時のバックアップ(~) (setq make-backup-files t) ;; 自動バックアップの実行有無 (setq version-control t) ;; バックアップファイルへの番号付与 (setq kept-new-versions 3) ;; 最新バックアップファイルの保持数 (setq kept-old-versions 0) ;; 最古バックアップファイルの保持数 (setq delete-old-versions t) ;; バックアップファイル削除の実行有無 ;; ファイルオープン時のバックアップ(~)の格納ディレクトリ (setq backup-directory-alist (cons (cons "\\.*$" (expand-file-name "/tmp/emacsbk")) backup-directory-alist)) ;; 編集中ファイルの自動バックアップ (setq backup-inhibited nil) ;; 終了時に自動バックアップファイルを削除 (setq delete-auto-save-files nil) ;; 編集中ファイルのバックアップ (setq auto-save-list-file-name nil) (setq auto-save-list-file-prefix nil) ;; 編集中ファイルのバックアップ間隔(秒) (setq auto-save-timeout 3) ;; 編集中ファイルのバックアップ間隔(打鍵) (setq auto-save-interval 100) ;; 編集中ファイル(##)の格納ディレクトリ (setq auto-save-file-name-transforms `((".*" ,(expand-file-name "/tmp/emacsbk") t))) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ file - lockfile ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; ロックファイルの生成を抑止 (setq create-lockfiles nil) ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; @ scroll ;;; ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; スクロール時のカーソル位置を維持 (setq scroll-preserve-screen-position t) ;; スクロール開始の残り行数 (setq scroll-margin 0) ;; スクロール時の行数 (setq scroll-conservatively 10000) ;; スクロール時の行数(scroll-marginに影響せず) (setq scroll-step 0) ;; 画面スクロール時の重複表示する行数 (setq next-screen-context-lines 1) ;; キー入力中の画面更新を抑止 (setq redisplay-dont-pause t) ;; recenter-top-bottomのポジション (setq recenter-positions '(top bottom)) ;; 横スクロール開始の残り列数 (setq hscroll-margin 1) ;; 横スクロール時の列数 (setq hscroll-step 1) ;; スクロールダウン (global-set-key (kbd "C-z") 'scroll-down) ;; バッファの最後までスクロールダウン (defadvice scroll-down (around scroll-down activate compile) (interactive) (let ( (bgn-num (+ 1 (count-lines (point-min) (point)))) ) (if (