Skip to content

Instantly share code, notes, and snippets.

@tequilasunset
Created December 22, 2010 23:58
Show Gist options
  • Save tequilasunset/752327 to your computer and use it in GitHub Desktop.
Save tequilasunset/752327 to your computer and use it in GitHub Desktop.
(require 'ghost-scratch)
;; directory を指定
(setq ghost-scratch-directory "~/.emacs.d/scratch.d")
;; 自動保存の間隔を分で指定(0 なら自動保存しない)
(setq ghost-auto-save-interval 5) ; default
;;; auto commit
;; 毎回実行 (default)
(setq ghost-commit-function 'ghost-auto-commit)
;; 前回 ghost-auto-commit が実行されてから5分以上経過していたら実行
(setq ghost-commit-function
(lambda () (ghost-auto-commit 5)))
;; 1日以上経過していたら実行
(setq ghost-commit-function
(lambda () (ghost-auto-commit (* 60 24))))
;; commit しない
(setq ghost-commit-function nil)
;;; commit comment
;; 文字列で指定
(setq ghost-commit-comment "Commit from Emacs")
;; 文字列を返す関数で指定
(setq ghost-commit-comment
(lambda ()
(format "%s %s@%s"
major-mode user-login-name (system-name))))
;; interactive に comment する
(setq ghost-commit-comment nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment