1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-31 22:37:54 +01:00
git/contrib/emacs
Lawrence Mitchell 0e59a6f601 git-blame.el: Use with-current-buffer where appropriate
In git-blame-filter and git-blame-create-overlay we want to save
(along with the values of point and mark) the current-buffer in scope
when calling the functions.  The idiom

    (save-excursion
      (set-buffer buf)
      ...)

will correctly restore the correct buffer, but will not save the
values of point and mark in buf (only in the buffer current when the
save-excursion call is executed).  The intention of these functions is
to save the current buffer from the calling scope and the values of
point and mark in the buffer they are modifying.  The correct idiom
for this is

    (with-current-buffer buf
      (save-excursion
        ...))

Signed-off-by: Rüdiger Sonderfeld <ruediger@c-plusplus.de>
Signed-off-by: Lawrence Mitchell <wence@gmx.li>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2012-06-14 10:59:15 -07:00
..
.gitignore contrib/emacs/Makefile: Provide tool for byte-compiling files. 2006-03-05 11:32:49 -08:00
git-blame.el git-blame.el: Use with-current-buffer where appropriate 2012-06-14 10:59:15 -07:00
git.el git.el: Use git-add-file for unmerged files, remove git-resolve-file 2009-09-09 12:11:44 -07:00
Makefile emacs: Remove the no longer maintained vc-git package. 2009-02-07 15:14:27 +01:00
README Add a README in the contrib/emacs directory. 2009-02-21 13:57:53 +01:00

This directory contains various modules for Emacs support.

To make the modules available to Emacs, you should add this directory
to your load-path, and then require the modules you want. This can be
done by adding to your .emacs something like this:

  (add-to-list 'load-path ".../git/contrib/emacs")
  (require 'git)
  (require 'git-blame)


The following modules are available:

* git.el:

  Status manager that displays the state of all the files of the
  project, and provides easy access to the most frequently used git
  commands. The user interface is as far as possible compatible with
  the pcl-cvs mode. It can be started with `M-x git-status'.

* git-blame.el:

  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.

* vc-git.el:

  This file used to contain the VC-mode backend for git, but it is no
  longer distributed with git. It is now maintained as part of Emacs
  and included in standard Emacs distributions starting from version
  22.2.

  If you have an earlier Emacs version, upgrading to Emacs 22 is
  recommended, since the VC mode in older Emacs is not generic enough
  to be able to support git in a reasonable manner, and no attempt has
  been made to backport vc-git.el.