This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; 日本語入力 (ddskk) | |
;; sudo apt-get install ddskk | |
;; 辞書は以下からダウンロードする | |
;; http://openlab.ring.gr.jp/skk/wiki/wiki.cgi?page=SKK%BC%AD%BD%F1#p7 | |
;; http://kddoing.ddo.jp/user/skk/SKK-JISYO.KAO.unannotated | |
;; http://omaemona.sourceforge.net/packages/Canna/SKK-JISYO.2ch | |
;; q 「かなモード」,「カナモード」間をトグルする. | |
;; l 「かなモード」または「カナモード」から「アスキーモード」へ. | |
;; L 「かなモード」または「カナモード」から「全英モード」へ. | |
;; 辞書をマージする |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; GNU Global | |
;; wget http://tamacom.com/global/global-6.2.8.tar.gz | |
(when (and (executable-find "global") | |
(locate-library "gtags")) | |
(autoload 'gtags-mode "gtags" "Gtags facility for Emacs." t) | |
(add-hook 'gtags-select-mode-hook | |
(lambda () ; 強調表示 | |
(when (fboundp 'hl-line-mode) (hl-line-mode t)))) | |
(let ((hook (lambda () | |
(when (fboundp 'gtags-mode) (gtags-mode t)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; GNU Global | |
;; wget http://tamacom.com/global/global-6.2.8.tar.gz | |
(when (and (executable-find "global") | |
(locate-library "gtags")) | |
(autoload 'gtags-mode "gtags" "Gtags facility for Emacs." t) | |
(add-hook 'gtags-select-mode-hook | |
(lambda () | |
(when (fboundp 'hl-line-mode) ; 強調表示 | |
(hl-line-mode 1)))) | |
(let ((hook (lambda () |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; require 時間を計測する | |
(defvar benchmark-alist nil) | |
(defadvice require | |
(around require-benchmark | |
(feature &optional filename noerror) | |
activate compile) | |
(let* ((before (time-to-seconds (current-time))) | |
(result ad-do-it) | |
(after (time-to-seconds (current-time))) | |
(time (* (- after before) 1000))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Psgml モード | |
;; C-c C-p DTD の Parse | |
;; C-c C-o 文章の Parse | |
;; C-c C-e element の挿入 | |
;; C-c / 終了タグを挿入 | |
(when (eval-and-compile | |
(and (require 'nxml-mode nil t) | |
(require 'psgml nil t))) | |
(autoload 'sgml-mode "psgml" "Major mode to edit SGML files." t) | |
(autoload 'xml-mode "psgml" "Major mode to edit XML files." t) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; C-q をプリフィックスキー化 | |
(define-key global-map (kbd "C-q") (make-sparse-keymap)) | |
;; 制御文字の挿入(デフォルト: C-q) | |
(define-key global-map (kbd "C-q C-q") 'quoted-insert) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 標準タグ検索 (etags) | |
;; M-. 検索, M-* 戻る | |
(defun exec-tags-command (exec &rest options) | |
"Execute etags or ctags command." | |
(if (and (executable-find "find") | |
(executable-find exec)) | |
(let ((lst '(("l" "[l]isp" "\\(el\\|cl\\)") | |
("c" "[c],c++" "\\(h\\|c\\|hh\\|cc\\|cpp\\)") | |
("j" "[j]ava" "java") | |
("js" "[js]cript" "js") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; タグ検索 | |
;; GNU Global | |
;; wget http://tamacom.com/global/global-6.2.8.tar.gz | |
;; タグファイル作成するコマンド (gtags -v) | |
(defun make-gtags () | |
"Make GTAGS file." | |
(interactive) | |
(if (and (executable-find "global") (executable-find "gtags")) | |
(let* ((default default-directory) | |
(dir (read-string "Directory: " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; VLC プレイリストのための XML パーサー | |
;; (install-elisp-from-emacswiki "xml-parse.el") | |
;; CSV 形式で一時バッファに出力する | |
(defun vlc-xml2csv-tempbuffer (tmpbuf &rest tags) | |
"Output temporary buffer from xml to csv." | |
(when (eval-and-compile (require 'xml-parse nil t)) | |
(goto-char (point-min)) | |
(with-output-to-temp-buffer tmpbuf | |
(dolist (tracklst (read-xml)) | |
(when (string= (xml-tag-name tracklst) "trackList") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defadvice boundp (around boundp-message (symbol) activate compile) | |
(if (eval ad-do-it) t | |
(message "boundp nil: %s" (ad-get-arg 0)) nil)) | |
(defadvice fboundp (around fboundp-message (symbol) activate compile) | |
(if (eval ad-do-it) t | |
(message "fboundp nil: %s" (ad-get-arg 0)) nil)) | |
(ad-disable-advice 'boundp 'around 'boundp-message) | |
(ad-activate 'boundp) |