annotate lisp/pcvs-defs.el @ 28215:ceaded4c2cb9

(x-charset-registries): Variable removed, instead the corresponding data is stored in the default fontset. (register-alternate-fontnames): Function removed. (resolved-ascii-font): Variable removed. (x-compose-font-name): Ignore the second argument REDOCE. (x-complement-fontset-spec): Complement only an ASCII font and element for those charsets than can use that ASCII font. (generate-fontset-menu): Don't refer to global-fontset-alist, instead call fontset-list. (uninstantiated-fontset-alist): Variable removed. (x-style-funcs-alist): Likewise. (fontset-default-styles): Likewise. (x-modify-font-name): Function removed. (create-fontset-from-fontset-spec): Ignore the argument STYLE-VARIANT. (create-fontset-from-ascii-font): Docsting adjusted for the above change. (instantiate-fontset, resolve-fontset-name): Functions removed. (fontset-list): Now implemented by C code.
author Kenichi Handa <handa@m17n.org>
date Tue, 21 Mar 2000 00:32:06 +0000
parents 4fe904444640
children 06cfa273543d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28088
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
1 ;;; pcvs-defs.el --- variable definitions for PCL-CVS
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
2
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
3 ;; Copyright (C) 1991-2000 Free Software Foundation, Inc.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
4
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
5 ;; Author: Stefan Monnier <monnier@cs.yale.edu>
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
6 ;; Keywords: pcl-cvs
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
7 ;; Version: $Name: $
28160
4fe904444640 (toplevel): Remove autoload cookie for form
Gerd Moellmann <gerd@gnu.org>
parents: 28088
diff changeset
8 ;; Revision: $Id: pcvs-defs.el,v 1.1 2000/03/11 03:42:29 monnier Exp $
28088
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
9
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
10 ;; This file is part of GNU Emacs.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
11
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
15 ;; any later version.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
16
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
20 ;; GNU General Public License for more details.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
21
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
25 ;; Boston, MA 02111-1307, USA.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
26
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
27 ;;; Commentary:
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
28
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
29
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
30 ;;; Code:
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
31
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
32 (defconst pcl-cvs-version "$Name: $")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
33
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
34 (eval-when-compile (require 'cl))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
35 (require 'pcvs-util)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
36
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
37 ;;;; -------------------------------------------------------
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
38 ;;;; START OF THINGS TO CHECK WHEN INSTALLING
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
39
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
40 (defvar cvs-program "cvs"
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
41 "*Name or full path of the cvs executable.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
42
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
43 (defvar cvs-version
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
44 (ignore-errors
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
45 (with-temp-buffer
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
46 (call-process "cvs" nil t nil "-v")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
47 (goto-char (point-min))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
48 (when (re-search-forward "(CVS) \\([0-9]+\\)\\.\\([0-9]+\\)" nil t)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
49 (cons (string-to-number (match-string 1))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
50 (string-to-number (match-string 2))))))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
51 "*Version of `cvs' installed on your system.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
52 It must be in the (MAJOR . MINOR) format.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
53
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
54 ;; FIXME: this is only used by cvs-mode-diff-backup
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
55 (defvar cvs-diff-program (or (and (boundp 'diff-command) diff-command) "diff")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
56 "*Name or full path of the best diff program you've got.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
57 NOTE: there are some nasty bugs in the context diff variants of some vendor
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
58 versions, such as the one in SunOS-4.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
59
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
60 ;;;; END OF THINGS TO CHECK WHEN INSTALLING
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
61 ;;;; --------------------------------------------------------
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
62
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
63 ;;;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
64 ;;;; User configuration variables:
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
65 ;;;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
66 ;;;; NOTE: these should be set in your ~/.emacs (or site-lisp/default.el) file.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
67 ;;;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
68
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
69 (defgroup pcl-cvs nil
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
70 "Special support for the CVS versioning system."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
71 :group 'tools
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
72 :prefix "cvs-")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
73
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
74 ;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
75 ;; cvsrc options
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
76 ;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
77
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
78 (defcustom cvs-cvsrc-file "~/.cvsrc"
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
79 "Path to your cvsrc file."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
80 :group 'pcl-cvs
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
81 :type '(file))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
82
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
83 (defvar cvs-shared-start 4
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
84 "Index of the first shared flag.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
85 If set to 4, for instance, a numeric argument smaller than 4 will
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
86 select a non-shared flag, while a numeric argument greater than 3
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
87 will select a shared-flag.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
88
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
89 (defvar cvs-shared-flags (make-list cvs-shared-start nil)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
90 "List of flags whose settings is shared among several commands.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
91
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
92 (defvar cvs-cvsroot nil
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
93 "*Specifies where the (current) cvs master repository is.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
94 Overrides the environment variable $CVSROOT by sending \" -d dir\" to
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
95 all CVS commands. This switch is useful if you have multiple CVS
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
96 repositories. It can be set interactively with \\[cvs-change-cvsroot.]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
97 There is no need to set this if $CVSROOT is set to a correct value.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
98
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
99 (defcustom cvs-auto-remove-handled nil
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
100 "*If up-to-date files should be acknowledged automatically.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
101 If T, they will be removed from the *cvs* buffer after every command.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
102 If DELAYED, they will be removed from the *cvs* buffer before every command.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
103 If STATUS, they will only be removed after a `cvs-mode-status' command.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
104 Else, they will never be automatically removed from the *cvs* buffer."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
105 :group 'pcl-cvs
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
106 :type '(choice (const nil) (const status) (const delayed) (const t)))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
107
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
108 (defcustom cvs-auto-remove-directories 'handled
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
109 "*If ALL, directory entries will never be shown.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
110 If HANLDED, only non-handled directories will be shown.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
111 If EMPTY, only non-empty directories will be shown."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
112 :group 'pcl-cvs
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
113 :type '(choice (const :tag "No" nil) (const all) (const handled) (const empty)))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
114
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
115 (defcustom cvs-auto-revert t
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
116 "*Non-nil if changed files should automatically be reverted."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
117 :group 'pcl-cvs
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
118 :type '(boolean))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
119
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
120 (defcustom cvs-sort-ignore-file t
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
121 "*Non-nil if `cvs-mode-ignore' should sort the .cvsignore automatically."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
122 :group 'pcl-cvs
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
123 :type '(boolean))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
124
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
125 (defcustom cvs-force-dir-tag t
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
126 "*If non-nil, tagging can only be applied to directories.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
127 Tagging should generally be applied a directory at a time, but sometimes it is
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
128 useful to be able to tag a single file. The normal way to do that is to use
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
129 `cvs-mode-force-command' so as to temporarily override the restrictions,"
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
130 :group 'pcl-cvs
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
131 :type '(boolean))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
132
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
133 (defcustom cvs-default-ignore-marks nil
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
134 "*Non-nil if cvs mode commands should ignore any marked files.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
135 Normally they run on the files that are marked (with `cvs-mode-mark'),
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
136 or the file under the cursor if no files are marked. If this variable
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
137 is set to a non-nil value they will by default run on the file on the
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
138 current line. See also `cvs-ignore-marks'"
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
139 :group 'pcl-cvs
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
140 :type '(boolean))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
141
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
142 (defvar cvs-diff-ignore-marks t
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
143 "Obsolete variable: use cvs-ignore-marks instead.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
144
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
145 (defcustom cvs-invert-ignore-marks
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
146 (let ((l ()))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
147 (unless (equal cvs-diff-ignore-marks cvs-default-ignore-marks)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
148 (push "diff" l))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
149 (when (and cvs-force-dir-tag (not cvs-default-ignore-marks))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
150 (push "tag" l))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
151 l)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
152 "*List of cvs commands that invert the default ignore-mark behavior.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
153 Commands in this set will use the opposite default from the one set
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
154 in `cvs-default-ignore-marks'."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
155 :group 'pcl-cvs
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
156 :type '(set (const "diff")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
157 (const "tag")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
158 (const "ignore")))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
159
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
160 (defcustom cvs-confirm-removals t
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
161 "*Ask for confirmation before removing files.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
162 Non-nil means that PCL-CVS will ask confirmation before removing files
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
163 except for files whose content can readily be recovered from the repository.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
164 A value of LIST means that the list of files to be deleted will be
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
165 displayed when asking for confirmation."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
166 :group 'pcl-cvs
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
167 :type '(choice (const list)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
168 (const t)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
169 (const nil)))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
170
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
171 (defcustom cvs-add-default-message nil
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
172 "*Default message to use when adding files.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
173 If set to NIL, `cvs-mode-add' will always prompt for a message."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
174 :group 'pcl-cvs
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
175 :type '(choice (const :tag "Prompt" nil)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
176 (string)))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
177
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
178 (defvar cvs-diff-buffer-name "*cvs-diff*"
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
179 "Obsolete variable: use `cvs-buffer-name-alist' instead.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
180
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
181 (defcustom cvs-find-file-and-jump t
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
182 "Jump to the modified area when finding a file.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
183 If non-nil, `cvs-mode-file-file' will place the cursor at the beginning of
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
184 the modified area. If the file is not locally modified, this will obviously
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
185 have no effect."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
186 :group 'pcl-cvs
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
187 :type '(boolean))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
188
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
189 (defcustom cvs-buffer-name-alist
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
190 '(("diff" cvs-diff-buffer-name diff-mode)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
191 ("status" "*cvs-info*" cvs-status-mode)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
192 ("tree" (format "*cvs-%s*" cmd) cvs-status-mode)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
193 ("message" "*cvs-commit*" nil log-edit)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
194 ("log" "*cvs-info*" log-view-mode))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
195 "*Buffer name and mode to be used for each command.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
196 This is a list of elements of the form
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
197
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
198 (CMD BUFNAME MODE &optional POSTPROC)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
199
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
200 CMD is the name of the command.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
201 BUFNAME is an expression that should evaluate to a string used as
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
202 a buffer name. It can use the variable CMD if it wants to.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
203 MODE is the command to use to setup the buffer.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
204 POSTPROC is a function that should be executed when the command terminates
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
205
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
206 The CMD used for `cvs-mode-commit' is \"message\". For that special
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
207 case, POSTPROC is called just after MODE with special arguments."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
208 :group 'pcl-cvs
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
209 :type '(repeat
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
210 (list (choice (const "diff")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
211 (const "status")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
212 (const "tree")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
213 (const "message")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
214 (const "log")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
215 (string))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
216 (choice (const "*vc-diff*")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
217 (const "*cvs-info*")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
218 (const "*cvs-commit*")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
219 (const (expand-file-name "*cvs-commit*"))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
220 (const (format "*cvs-%s*" cmd))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
221 (const (expand-file-name (format "*cvs-%s*" cmd)))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
222 (sexp :value "my-cvs-info-buffer")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
223 (const nil))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
224 (choice (function-item diff-mode)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
225 (function-item cvs-edit-mode)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
226 (function-item cvs-status-mode)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
227 function
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
228 (const nil))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
229 (set :inline t
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
230 (choice (function-item cvs-status-cvstrees)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
231 (function-item cvs-status-trees)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
232 function)))))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
233
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
234 (defvar cvs-buffer-name '(expand-file-name "*cvs*" dir) ;; "*cvs*"
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
235 "Name of the cvs buffer.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
236 This expression will be evaluated in an environment where DIR is set to
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
237 the directory name of the cvs buffer.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
238
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
239 (defvar cvs-temp-buffer-name '(expand-file-name " *cvs-tmp*" dir)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
240 "*Name of the cvs temporary buffer.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
241 Output from cvs is placed here for asynchronous commands.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
242
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
243 (defcustom cvs-idiff-imerge-handlers
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
244 (if (fboundp 'ediff)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
245 '(cvs-ediff-diff . cvs-ediff-merge)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
246 '(cvs-emerge-diff . cvs-emerge-merge))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
247 "*Pair of functions to be used for resp. diff'ing and merg'ing interactively."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
248 :group 'pcl-cvs
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
249 :type '(choice (const :tag "Ediff" (cvs-ediff-diff . cvs-ediff-merge))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
250 (const :tag "Emerge" (cvs-emerge-diff . cvs-emerge-merge))))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
251
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
252 (defvar pcl-cvs-load-hook nil
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
253 "Run after loading pcl-cvs.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
254
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
255 (defvar cvs-mode-hook nil
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
256 "Run after `cvs-mode' was setup.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
257
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
258
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
259 ;;;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
260 ;;;; Internal variables, used in the process buffer.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
261 ;;;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
262
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
263 (defvar cvs-postprocess nil
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
264 "(Buffer local) what to do once the process exits.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
265
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
266 ;;;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
267 ;;;; Internal variables for the *cvs* buffer.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
268 ;;;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
269
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
270 (defcustom cvs-reuse-cvs-buffer 'subdir
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
271 "When to reuse an existing cvs buffer.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
272 Alternatives are:
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
273 CURRENT: just reuse the current buffer if it is a cvs buffer
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
274 SAMEDIR: reuse any cvs buffer displaying the same directory
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
275 SUBDIR: or reuse any cvs buffer displaying any sub- or super- directory
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
276 ALWAYS: reuse any cvs buffer."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
277 :group 'pcl-cvs
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
278 :type '(choice (const always) (const subdir) (const samedir) (const current)))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
279
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
280 (defvar cvs-temp-buffer nil
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
281 "(Buffer local) The temporary buffer associated with this *cvs* buffer.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
282
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
283 (defvar cvs-lock-file nil
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
284 "Full path to a lock file that CVS is waiting for (or was waiting for).
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
285 This variable is buffer local and only used in the *cvs* buffer.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
286
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
287 (defvar cvs-lock-file-regexp "^#cvs\\.\\([trw]fl\\.[-.a-z0-9]+\\|lock\\)\\'"
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
288 "Regexp matching the possible names of locks in the CVS repository.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
289
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
290 (defconst cvs-cursor-column 22
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
291 "Column to position cursor in in `cvs-mode'.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
292
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
293 ;;;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
294 ;;;; Global internal variables
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
295 ;;;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
296
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
297 (defconst cvs-startup-message
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
298 (concat "PCL-CVS release " pcl-cvs-version)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
299 "*Startup message for CVS.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
300
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
301 (defconst cvs-vendor-branch "1.1.1"
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
302 "The default branch used by CVS for vendor code.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
303
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
304 (defvar cvs-menu
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
305 '("CVS"
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
306 ["Open File.." cvs-mode-find-file t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
307 [" ..Other Window" cvs-mode-find-file-other-window t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
308 ["Interactive Merge" cvs-mode-imerge t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
309 ["Interactive Diff" cvs-mode-idiff t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
310 ["View Diff" cvs-mode-diff (cvs-enabledp 'diff)]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
311 ["Diff with Vendor" cvs-mode-diff-vendor t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
312 ["Diff with Backup" cvs-mode-diff-backup t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
313 ["View Log" cvs-mode-log t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
314 ["View Status" cvs-mode-status t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
315 "----"
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
316 ["Update" cvs-mode-update (cvs-enabledp 'update)]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
317 ["Re-Examine" cvs-mode-examine t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
318 ["Commit" cvs-mode-commit-setup (cvs-enabledp 'commit)]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
319 ["Undo Changes" cvs-mode-undo (cvs-enabledp 'undo)]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
320 ["Add" cvs-mode-add (cvs-enabledp 'add)]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
321 ["Remove" cvs-mode-remove (cvs-enabledp 'remove)]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
322 ["Ignore" cvs-mode-ignore (cvs-enabledp 'ignore)]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
323 ["Add ChangeLog" cvs-mode-add-change-log-entry-other-window t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
324 "----"
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
325 ["Mark All" cvs-mode-mark-all-files t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
326 ["Unmark All" cvs-mode-unmark-all-files t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
327 ["Hide Handled" cvs-mode-remove-handled t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
328 "----"
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
329 ;; ["Update Directory" cvs-update t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
330 ;; ["Examine Directory" cvs-examine t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
331 ;; ["Status Directory" cvs-status t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
332 ;; ["Checkout Module" cvs-checkout t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
333 ;; "----"
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
334 ["Quit" cvs-mode-quit t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
335 ))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
336
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
337 (easy-mmode-defmap cvs-mode-diff-map
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
338 '(("=" . cvs-mode-diff)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
339 ("b" . cvs-mode-diff-backup)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
340 ("2" . cvs-mode-idiff-other)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
341 ("h" . cvs-mode-diff-head)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
342 ("v" . cvs-mode-diff-vendor)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
343 ("?" . cvs-mode-diff-help)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
344 ("e" . cvs-mode-idiff)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
345 ("E" . cvs-mode-imerge))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
346 "Keymap for diff-related operations in `cvs-mode'.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
347
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
348 (easy-mmode-defmap cvs-mode-map
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
349 ;;(define-prefix-command 'cvs-mode-map-diff-prefix)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
350 ;;(define-prefix-command 'cvs-mode-map-control-c-prefix)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
351 `(;; simulate `suppress-keymap'
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
352 (self-insert-command . undefined)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
353 (("0" "1" "2" "3" "4" "5" "6" "7" "8" "9") . digit-argument)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
354 ("-" . negative-argument)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
355 ;; various
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
356 (undo . cvs-mode-undo)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
357 ("?" . cvs-help)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
358 ("h" . cvs-help)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
359 ("q" . cvs-bury-buffer)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
360 ;;("Q" . kill-buffer)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
361 ("F" . cvs-mode-set-flags)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
362 ("\M-f" . cvs-mode-force-command)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
363 ("\C-c\C-c" . cvs-mode-kill-process)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
364 ;; marking
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
365 ("m" . cvs-mode-mark)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
366 ("M" . cvs-mode-mark-all-files)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
367 ("u" . cvs-mode-unmark)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
368 ("\C-?". cvs-mode-unmark-up)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
369 ("%" . cvs-mode-mark-matching-files)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
370 ("T" . cvs-mode-toggle-marks)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
371 ("\M-\C-?" . cvs-mode-unmark-all-files)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
372 ;; navigation keys
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
373 (" " . cvs-mode-next-line)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
374 ("n" . cvs-mode-next-line)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
375 ("p" . cvs-mode-previous-line)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
376 ;; M- keys are usually those that operate on modules
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
377 ;;("\M-C". cvs-mode-rcs2log) ; i.e. "Create a ChangeLog"
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
378 ;;("\M-t". cvs-rtag)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
379 ;;("\M-l". cvs-rlog)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
380 ("\M-c". cvs-checkout)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
381 ("\M-e". cvs-examine)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
382 ("g" . cvs-mode-revert-buffer)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
383 ("\M-u". cvs-update)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
384 ("\M-s". cvs-status)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
385 ;; diff commands
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
386 ("=" . cvs-mode-diff)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
387 ("d" . ,cvs-mode-diff-map)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
388 ;; keys that operate on individual files
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
389 ("\C-k". cvs-mode-acknowledge)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
390 ("A" . cvs-mode-add-change-log-entry-other-window)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
391 ;;("B" . cvs-mode-byte-compile-files)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
392 ("C" . cvs-mode-commit-setup)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
393 ("O" . cvs-mode-update)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
394 ("U" . cvs-mode-undo)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
395 ("I" . cvs-mode-insert)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
396 ("a" . cvs-mode-add)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
397 ("b" . cvs-set-branch-prefix)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
398 ("B" . cvs-set-secondary-branch-prefix)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
399 ("c" . cvs-mode-commit)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
400 ("e" . cvs-mode-examine)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
401 ("f" . cvs-mode-find-file)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
402 ("i" . cvs-mode-ignore)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
403 ("l" . cvs-mode-log)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
404 ("o" . cvs-mode-find-file-other-window)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
405 ("r" . cvs-mode-remove)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
406 ("s" . cvs-mode-status)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
407 ("t" . cvs-mode-tag)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
408 ;;("v" . cvs-mode-diff-vendor)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
409 ("x" . cvs-mode-remove-handled)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
410 ;; cvstree bindings
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
411 ("+" . cvs-mode-tree)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
412 ;; mouse bindings
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
413 ([(down-mouse-3)] . cvs-menu)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
414 ;; Emacs-21 toolbar
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
415 ;;([tool-bar item1] . (menu-item "Examine" cvs-examine :image (image :file "/usr/share/icons/xpaint.xpm" :type xpm)))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
416 ;;([tool-bar item2] . (menu-item "Update" cvs-update :image (image :file "/usr/share/icons/mail1.xpm" :type xpm)))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
417 )
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
418 "Keymap for `cvs-mode'."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
419 :dense t)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
420
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
421 (fset 'cvs-mode-map cvs-mode-map)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
422
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
423 ;; add the cvs-menu to the map so it's added whenever we are in cvs-mode
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
424 (when (ignore-errors (require 'easymenu))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
425 (easy-menu-define cvs-menu-map
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
426 cvs-mode-map
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
427 "Menu used in cvs-mode."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
428 cvs-menu))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
429
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
430 ;;;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
431 ;;;; CVS-Minor mode
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
432 ;;;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
433
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
434 (defcustom cvs-minor-mode-prefix "\C-xc"
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
435 "Prefix key for the `cvs-mode' bindings in `cvs-minor-mode'."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
436 :group 'pcl-cvs)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
437
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
438 (easy-mmode-defmap cvs-minor-mode-map
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
439 `((,cvs-minor-mode-prefix . cvs-mode-map))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
440 "Keymap for `cvs-minor-mode', used in buffers related to pcl-cvs.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
441
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
442 (defvar cvs-buffer nil
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
443 "(Buffer local) The *cvs* buffer associated with this buffer.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
444 (put 'cvs-buffer 'permanent-local t)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
445 ;;(make-variable-buffer-local 'cvs-buffer)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
446
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
447 (defvar cvs-minor-wrap-function nil
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
448 "Function to call when switching to the *cvs* buffer.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
449 Takes two arguments:
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
450 - a *cvs* buffer.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
451 - a zero-arg function which is guaranteed not to switch buffer.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
452 It is expected to call the function.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
453 ;;(make-variable-buffer-local 'cvs-minor-wrap-function)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
454
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
455 (defvar cvs-minor-current-files)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
456 ;;"Current files in a `cvs-minor-mode' buffer."
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
457 ;; This should stay `void' because we want to be able to tell the difference
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
458 ;; between an empty list and no list at all.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
459
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
460 (defconst cvs-pcl-cvs-dirchange-re "^pcl-cvs: descending directory \\(.*\\)$")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
461
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
462 ;;;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
463 ;;;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
464 ;;;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
465
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
466 (if (progn (condition-case () (require 'easymenu) (error nil))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
467 (fboundp 'easy-menu-add-item))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
468 (easy-menu-add-item nil '("tools")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
469 '("PCL CVS"
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
470 ["Update Directory" cvs-update t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
471 ["Examine Directory" cvs-examine t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
472 ["Status Directory" cvs-status t]
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
473 ["Checkout Module" cvs-checkout t]) "vc"))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
474
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
475
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
476 ;; cvs-1.10 and above can take file arguments in other directories
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
477 ;; while others need to be executed once per directory
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
478 (defvar cvs-execute-single-dir
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
479 (if (and (consp cvs-version)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
480 (or (>= (cdr cvs-version) 10) (> (car cvs-version) 1)))
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
481 '("status")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
482 t)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
483 "Whether cvs commands should be executed a directory at a time.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
484 If a list, specifies for which commands the single-dir mode should be used.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
485 If T, single-dir mode should be used for all operations.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
486
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
487 CVS versions before 1.10 did not allow passing them arguments in different
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
488 directories, so pcl-cvs checks what version you're using to determine
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
489 whether to use the new feature or not.
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
490 Sadly, even with a new cvs executable, if you connect to an older cvs server
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
491 \(typically a cvs-1.9 on the server), the old restriction applies. In such
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
492 a case the sanity check made by pcl-cvs fails and you will have to manually
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
493 set this variable to T (until the cvs server is upgraded).
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
494 When the above problem occurs, pcl-cvs should (hopefully) catch cvs' error
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
495 message and replace it with a message tell you to change this variable.")
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
496
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
497 ;;
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
498 (provide 'pcvs-defs)
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
499
b442dfc3cef0 *** empty log message ***
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
diff changeset
500 ;;; pcl-cvs-defs.el ends here