[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
vc-hooks+.el - extensions to GNU `vc-hooks.el'
From: |
Drew Adams |
Subject: |
vc-hooks+.el - extensions to GNU `vc-hooks.el' |
Date: |
Tue, 16 Jan 2001 21:35:20 -0500 |
;;; vc-hooks+.el --- Extensions to `vc-hooks.el'.
;;
;; Filename: vc-hooks+.el
;; Description: Extensions to `vc-hooks.el'.
;; Author: Drew Adams
;; Maintainer: Drew Adams
;; Copyright (C) 1999-2001, Drew Adams, all rights reserved.
;; Created: Mon Jun 19 10:51:38 2000
;; Version: $Id: vc-hooks+.el,v 1.3 2001/01/09 22:37:06 dadams Exp $
;; Last-Updated: Tue Jan 9 14:37:00 2001
;; By: dadams
;; Update #: 65
;; Keywords: version control
;; Compatibility: GNU Emacs 20.x
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Commentary:
;;
;; Extensions to `vc-hooks.el'.
;;
;; The following global bindings are made here:
;;
;; `C-x v =' `vc-ediff'
;; `C-x v . `vc-status-here'
;; `C-x 4 v . `vc-status-here-other-window'
;; `C-x 5 v . `vc-status-here-other-frame'
;; `C-x v d `vc-status-here'
;; `C-x 4 v d `vc-status-here-other-window'
;; `C-x 5 v d `vc-status-here-other-frame'
;; `C-x v C-r' `vc-rename-file'
;;
;; The following binding is made here for mode `vc-dired-mode':
;;
;; `C-=' `vc-ediff'
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Change log:
;;
;; RCS $Log: vc-hooks+.el,v $
;; RCS Revision 1.3 2001/01/09 22:37:06 dadams
;; RCS Adapted file header for Emacs Lisp Archive.
;; RCS
;; RCS Revision 1.2 2001/01/03 17:28:24 dadams
;; RCS *** empty log message ***
;; RCS
;; RCS Revision 1.1 2000/09/14 17:24:42 dadams
;; RCS Initial revision
;; RCS
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; 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, 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; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Code:
(require 'vc-hooks)
(autoload 'vc-ediff "vc+" "Compare file versions using `ediff'." t)
(autoload 'vc-status-here "vc+"
"Show version-control status of files in current directory." t)
(autoload 'vc-status-here-other-window "vc+"
"Show version-control status of files in current directory." t)
(autoload 'vc-status-here-other-frame "vc+"
"Show version-control status of files in current directory." t)
(provide 'vc-hooks+)
;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;; Key bindings
;;; `vc-prefix-map' is defined in `vc-hooks.el' (always loaded).
;;; `vc-dired-mode-map' is defined in `vc.el' (via `define-derived-mode',
;;; so no ;;;###autoload).
;;;###autoload
(define-key vc-prefix-map [?\C-r] 'vc-rename-file)
;; Switch standard `vc-diff' bindings.
;;;###autoload
(define-key vc-prefix-map [?\C-=] 'vc-diff)
;;;###autoload
(define-key vc-prefix-map [?=] 'vc-ediff)
;; Do this in `vc+.el', not here:
;; (define-key vc-dired-mode-map [?\"] 'vc-ediff)
(when (fboundp 'menu-bar-ediff-menu) ; Defined in `ediff-hook.el'.
(define-key menu-bar-ediff-menu [ediff-revision]
'("File with Revision..." . vc-ediff)))
;;;###autoload
(define-key vc-prefix-map "." 'vc-status-here)
;;;###autoload
(define-key ctl-x-4-map "v." 'vc-status-here-other-window)
;;;###autoload
(define-key ctl-x-4-map "vd" 'vc-directory-other-window)
;;;###autoload
(define-key ctl-x-5-map "v." 'vc-status-here-other-frame)
;;;###autoload
(define-key ctl-x-5-map "vd" 'vc-directory-other-frame)
;;; Menu bar bindings
(define-key-after vc-menu-map [ediff-revision]
'("Compare Version" . vc-ediff) 'vc-update-change-log)
(put 'vc-ediff 'menu-enable
'(or vc-mode vc-dired-mode (eq 'dired-mode major-mode)))
(define-key vc-menu-map [vc-diff] '("Compare Version Using Diff" . vc-diff))
(put 'vc-diff 'menu-enable
'(or vc-mode vc-dired-mode (eq 'dired-mode major-mode)))
(define-key-after vc-menu-map [vc-status-here]
'("Files Here" . vc-status-here) 'separator1)
(define-key vc-menu-map [vc-directory] '("Files Below" . vc-directory))
(put 'vc-annotate 'menu-enable
'(or (eq (vc-buffer-backend) 'CVS) vc-dired-mode (eq 'dired-mode
major-mode)))
(put 'vc-cancel-version 'menu-enable
'(or vc-mode vc-dired-mode (eq 'dired-mode major-mode)))
(put 'vc-insert-headers 'menu-enable '(or vc-mode vc-dired-mode))
(put 'vc-print-log 'menu-enable
'(or vc-mode vc-dired-mode (eq 'dired-mode major-mode)))
;; Standard Emacs has this, for vc-register:
;; '(and buffer-file-name (not vc-mode))
(put 'vc-register 'menu-enable
'(not vc-mode)) ; vc-dired-mode is OK (e.g. Unregistered).
(put 'vc-rename-file 'menu-enable
'(or vc-mode vc-dired-mode (eq 'dired-mode major-mode)))
(put 'vc-revert-buffer 'menu-enable
'(or vc-mode vc-dired-mode (eq 'dired-mode major-mode)))
(put 'vc-toggle-read-only 'menu-enable
'(or vc-mode vc-dired-mode))
(put 'vc-update-change-log 'menu-enable
'(or (eq (vc-buffer-backend) 'RCS) vc-dired-mode (eq 'dired-mode
major-mode)))
(put 'vc-version-other-window 'menu-enable
'(or vc-mode vc-dired-mode (eq 'dired-mode major-mode)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; `vc-hooks+.el' ends here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- vc-hooks+.el - extensions to GNU `vc-hooks.el',
Drew Adams <=