Use gac as prefix for symbol names

I refused to do this before because it reminds me too much of .Net's
Global Assembly Cache. Now I feel I need it, though, since
`git-auto-commit' is too long.
This commit is contained in:
Tom Willemsen 2012-05-20 14:18:03 +02:00
parent 18f9fb41e4
commit 84b6267ce0

View file

@ -32,7 +32,7 @@
;;; Code:
(defun git-auto-commit-relative-file-name (filename)
(defun gac-relative-file-name (filename)
"Find the path to the filename relative to the git directory"
(let* ((git-dir
(replace-regexp-in-string
@ -44,11 +44,11 @@
git-dir "" filename))))
relative-file-name))
(defun git-auto-commit ()
(defun gac-commit ()
"Commit `buffer-file-name' to git"
(let* ((filename (buffer-file-name))
(relative-filename
(git-auto-commit-relative-file-name filename)))
(gac-relative-file-name filename)))
(shell-command
(concat "git add " filename
" && git commit -m '" relative-filename "'"))))
@ -58,7 +58,7 @@
mode turned on"
:lighter " ga"
(if git-auto-commit-mode
(add-hook 'after-save-hook 'git-auto-commit t t)
(remove-hook 'after-save-hook 'git-auto-commit t)))
(add-hook 'after-save-hook 'gac-commit t t)
(remove-hook 'after-save-hook 'gac-commit t)))
;;; git-auto-commit-mode.el ends here