summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9e2586f)
raw | patch | inline | side by side (parent: 9e2586f)
author | Jakub Narebski <jnareb@gmail.com> | |
Fri, 9 Feb 2007 08:19:28 +0000 (09:19 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 9 Feb 2007 08:52:52 +0000 (00:52 -0800) |
Add Emacs Lisp file headers, according to "Coding Conventions" chapter
in Emacs Lisp Reference Manual and Elisp Area Convetions for
EmacsWiki:
http://www.emacswiki.org/cgi-bin/wiki/ElispAreaConventions
Those include: copyright notice, GNU GPL boilerplate, description and
instalation instructions as provided in email and in commit message
introducing git-blame.el, compatibility notes from another email by
David Kågedal about what to change to use it in GNU Emacs 20, and
"git-blame ends here" to detect if file was truncated. First line
includes setting file encoding via first line local variable values
(file variables).
Added comment to "(require 'cl)" to note why it is needed; "Coding
Conventions" advises to avoid require the `cl' package of Common Lisp
extensions at run time.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
in Emacs Lisp Reference Manual and Elisp Area Convetions for
EmacsWiki:
http://www.emacswiki.org/cgi-bin/wiki/ElispAreaConventions
Those include: copyright notice, GNU GPL boilerplate, description and
instalation instructions as provided in email and in commit message
introducing git-blame.el, compatibility notes from another email by
David Kågedal about what to change to use it in GNU Emacs 20, and
"git-blame ends here" to detect if file was truncated. First line
includes setting file encoding via first line local variable values
(file variables).
Added comment to "(require 'cl)" to note why it is needed; "Coding
Conventions" advises to avoid require the `cl' package of Common Lisp
extensions at run time.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
contrib/emacs/git-blame.el | patch | blob | history |
index 62cf24c996b3eb602a6cb5f1ce30e84ff9d7d313..ba9d8a6cdeb97b51082cbcf0b91ad09097876824 100644 (file)
-;;; git-blame.el
-;; David Kågedal <davidk@lysator.liu.se>
+;;; git-blame.el --- Minor mode for incremental blame for Git -*- coding: utf-8 -*-
+;;
+;; Copyright (C) 2007 David Kågedal
+;;
+;; Authors: David Kågedal <davidk@lysator.liu.se>
+;; Created: 31 Jan 2007
;; Message-ID: <87iren2vqx.fsf@morpheus.local>
+;; License: GPL
+;; Keywords: git, version control, release management
+;;
+;; Compatibility: Emacs21
+
+
+;; This file is *NOT* part of GNU Emacs.
+;; This file is distributed under the same terms as GNU Emacs.
+
+;; This program 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 program 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 program; if not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+;; MA 02111-1307 USA
+
+;; http://www.fsf.org/copyleft/gpl.html
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Commentary:
+;;
+;; Here is an Emacs implementation of incremental git-blame. When you
+;; turn it on while viewing a file, the editor buffer will be updated by
+;; setting the background of individual lines to a color that reflects
+;; which commit it comes from. And when you move around the buffer, a
+;; one-line summary will be shown in the echo area.
+
+;;; Installation:
+;;
+;; 1) Load into emacs: M-x load-file RET git-blame.el RET
+;; 2) Open a git-controlled file
+;; 3) Blame: M-x git-blame-mode
+
+;;; Compatibility:
+;;
+;; It requires GNU Emacs 21. If you'are using Emacs 20, try
+;; changing this:
+;;
+;; (overlay-put ovl 'face (list :background
+;; (cdr (assq 'color (cddddr info)))))
+;;
+;; to
+;;
+;; (overlay-put ovl 'face (cons 'background-color
+;; (cdr (assq 'color (cddddr info)))))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;;; Code:
+
+(require 'cl) ; to use `push', `pop'
-(require 'cl)
(defun color-scale (l)
(let* ((colors ())
r g b)
(shell-command
(format "git log -1 --pretty=oneline %s" (or hash
(git-blame-current-commit)))))
+
+(provide 'git-blame)
+
+;;; git-blame.el ends here