Skip to content

Instantly share code, notes, and snippets.

;;; 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)
@sluchin
sluchin / .emacs.el
Last active December 15, 2015 21:19
require 時間計測
;;; 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)))
@sluchin
sluchin / .emacs.el
Last active December 15, 2015 17:49
;;; 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 ()
;;; 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))
@sluchin
sluchin / .emacs.el
Created March 9, 2013 17:09
configure ddskk
;;; 日本語入力 (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 「かなモード」または「カナモード」から「全英モード」へ.
;; 辞書をマージする
;; 個人辞書の文字コードを指定する
;(setq skk-jisyo-code 'utf-8)
;;; sticky
(install-elisp-from-emacswiki "sticky.el")
(when (eval-and-compile (require 'sticky nil t))
;; 英語キーボード
(when (fboundp 'use-sticky-key)
(use-sticky-key (kbd "TAB") sticky-alist:en)))
;; 関数名表示をトグルする
(defun toggle-which-func-mode ()
(interactive)
(if which-function-mode
(which-function-mode -1)
(which-function-mode 1))
(if which-function-mode
(setq-default header-line-format
'(which-function-mode ("" which-func-format)))
(setq-default header-line-format nil)))
;; (if (version< "24.0.0" emacs-version)
;; (when (locate-library "notifications")
;; (autoload 'notifications-notify "notifications" "Notify TITLE, BODY."))
;; (when (locate-library "notify")
;; (autoload 'notify "notify" "Notify TITLE, BODY.")))
;; bzr trunk の最新をコピー
(autoload 'notifications-notify "notifications" "Notify TITLE, BODY.")
;;; -*- mode: emacs-lisp; coding: utf-8; indent-tabs-mode: nil -*-
;;; Emacs 初期化ファイル
;;; バージョン
;; 2012-12-28
;; GNU Emacs 24.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
;; 2012-11-27
;; GNU Emacs 23.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
;;; 設定を読み込まない起動オプション