git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xavier Maillard <zedek@gnu.org>
To: git@vger.kernel.org
Cc: julliard@winehq.org
Subject: [PATCH 5/7] Try to do things in the right order
Date: Sat, 03 Mar 2007 11:19:52 +0100	[thread overview]
Message-ID: <15303.1172917192@localhost> (raw)


* emacs/vc-git.el: Added an ugly hack to properly reload vc-git. Only
  add GIT to vc-backends list after loading vc. Do not walk .git
  directory (add it to the exclusion-list).

  Changed installation instructions as discussed on Git mailing list

Signed-off-by: Xavier Maillard <zedek@gnu.org>
---
 contrib/emacs/vc-git.el |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/contrib/emacs/vc-git.el b/contrib/emacs/vc-git.el
index 748cb60..3f37e6d 100644
--- a/contrib/emacs/vc-git.el
+++ b/contrib/emacs/vc-git.el
@@ -22,7 +22,8 @@
 ;; This file contains a VC backend for the git version control
 ;; system.
 ;;
-;; To install: put this file on the load-path.
+;; To install: put this file on the load-path then add this line into
+;;   your .emacs: (require 'vc-git)
 ;;
 ;; TODO
 ;;  - changelog generation
@@ -35,8 +36,14 @@
   (require 'vc)
   (require 'cl))
 
-;; Add it automatically
-(add-to-list 'vc-handled-backends 'GIT)
+;; HACK: clear up the cache to force vc-call to check again and
+;; discover new functions when we reload this file.
+(put 'GIT 'vc-functions nil)
+
+;; Add it automatically when loading vc
+;; FIXME: should be directly put into vc.el
+(eval-after-load "vc"
+  '(add-to-list 'vc-handled-backends 'GIT))
 
 (defgroup vc-git nil
   "*This is GIT backend for vc."
@@ -188,4 +195,8 @@ COMMENT is the new comment."
 ;;;###autoload
 (add-to-list 'completion-ignored-extensions ".git/")
 
+(eval-after-load "vc" 
+    '(add-to-list 'vc-directory-exclusion-list ".git" t))
+
 (provide 'vc-git)
+;;; vc-git.el ends here
\ No newline at end of file
-- 
1.5.0

             reply	other threads:[~2007-03-03 10:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-03 10:19 Xavier Maillard [this message]
2007-03-03 10:32 ` [PATCH 5/7] Try to do things in the right order Alexandre Julliard
2007-03-05  7:27   ` Xavier Maillard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15303.1172917192@localhost \
    --to=zedek@gnu.org \
    --cc=git@vger.kernel.org \
    --cc=julliard@winehq.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).