]> code.delx.au - gnu-emacs/blobdiff - lisp/cvs-status.el
* view.el (view-recenter): Allow recenter to compute window height
[gnu-emacs] / lisp / cvs-status.el
index 419f8567a90388a37300267b36280a9181f3cdea..583323ba0e8ba69fe42746440f794b082ae174c6 100644 (file)
@@ -1,16 +1,17 @@
 ;;; cvs-status.el --- major mode for browsing `cvs status' output -*- coding: utf-8 -*-
 
-;; Copyright (C) 1999, 2000, 03, 2004  Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
+;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
-;; Author: Stefan Monnier <monnier@cs.yale.edu>
+;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
 ;; Keywords: pcl-cvs cvs status tree tools
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs 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.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,9 +19,7 @@
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
@@ -31,7 +30,6 @@
 ;;; Code:
 
 (eval-when-compile (require 'cl))
-(eval-when-compile (require 'pcvs))
 (require 'pcvs-util)
 
 ;;;
@@ -50,7 +48,7 @@
     ("\M-p"    . cvs-status-prev)
     ("t"       . cvs-status-cvstrees)
     ("T"       . cvs-status-trees)
-    (">"        . cvs-status-checkout))
+    (">"        . cvs-mode-checkout))
   "CVS-Status' keymap."
   :group 'cvs-status
   :inherit 'cvs-mode-map)
@@ -73,8 +71,8 @@
 
 (defconst cvs-status-font-lock-keywords
   `((,cvs-status-entry-leader-re
-     (1 'cvs-filename-face)
-     (2 'cvs-need-action-face))
+     (1 'cvs-filename)
+     (2 'cvs-need-action))
     (,cvs-status-tags-leader-re
      (,cvs-status-rev-re
       (save-excursion (re-search-forward "^\n" nil 'move) (point))
@@ -89,7 +87,7 @@
 (defconst cvs-status-font-lock-defaults
   '(cvs-status-font-lock-keywords t nil nil nil (font-lock-multiline . t)))
 
-
+(defvar cvs-minor-wrap-function)
 (put 'cvs-status-mode 'mode-class 'special)
 ;;;###autoload
 (define-derived-mode cvs-status-mode fundamental-mode "CVS-Status"
     (let* ((file (match-string 1))
           (cvsdir (and (re-search-backward cvs-status-dir-re nil t)
                        (match-string 1)))
-          (pcldir (and (re-search-backward cvs-pcl-cvs-dirchange-re nil t)
+          (pcldir (and (if (boundp 'cvs-pcl-cvs-dirchange-re)
+                           (re-search-backward cvs-pcl-cvs-dirchange-re nil t))
                        (match-string 1)))
           (dir ""))
       (let ((default-directory ""))
@@ -466,25 +465,6 @@ Optional prefix ARG chooses between two representations."
            ;;(sit-for 0)
            ))))))
 
-(defun-cvs-mode (cvs-status-checkout . NOARGS) (dir)
-  "Run cvs-checkout against the tag under the point.
-The files are stored to DIR."
-  (interactive 
-   (let* ((module (cvs-get-module))
-         (branch (cvs-prefix-get 'cvs-branch-prefix))
-         (prompt (format "CVS Checkout Directory for `%s%s': " 
-                        module
-                        (if branch (format "(branch: %s)" branch)
-                          ""))))
-     (list
-      (read-directory-name prompt
-                          nil default-directory nil))))
-  (let ((modules (cvs-string->strings (cvs-get-module)))
-       (flags (cvs-add-branch-prefix
-               (cvs-flags-query 'cvs-checkout-flags "cvs checkout flags")))
-       (cvs-cvsroot (cvs-get-cvsroot)))
-    (cvs-checkout modules dir flags)))
-
 (defun cvs-tree-tags-insert (tags prev)
   (when tags
     (let* ((tag (car tags))
@@ -556,5 +536,5 @@ The files are stored to DIR."
 
 (provide 'cvs-status)
 
-;;; arch-tag: db8b5094-d02a-473e-a476-544e89ff5ad0
+;; arch-tag: db8b5094-d02a-473e-a476-544e89ff5ad0
 ;;; cvs-status.el ends here