]> code.delx.au - gnu-emacs/blobdiff - lisp/pcvs-info.el
Switch to recommended form of GPLv3 permissions notice.
[gnu-emacs] / lisp / pcvs-info.el
index cf367072838e8e3d31402d6260ed21f5dd8fe4da..983e451a40c591d1c4edbb6627814e3618a08e8b 100644 (file)
@@ -1,17 +1,18 @@
 ;;; pcvs-info.el --- internal representation of a fileinfo entry
 
 ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-;;   2000, 2004, 2005  Free Software Foundation, Inc.
+;;   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+;;   Free Software Foundation, Inc.
 
-;; Author: Stefan Monnier <monnier@cs.yale.edu>
+;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
 ;; Keywords: pcl-cvs
 
 ;; 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
@@ -19,9 +20,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:
 
 ;;;; config variables
 ;;;;
 
+(define-obsolete-variable-alias 'cvs-display-full-path
+    'cvs-display-full-name "22.1")
+
 (defcustom cvs-display-full-name t
   "*Specifies how the filenames should be displayed in the listing.
 If non-nil, their full filename name will be displayed, else only the
 non-directory part."
   :group 'pcl-cvs
   :type '(boolean))
-(define-obsolete-variable-alias 'cvs-display-full-path 'cvs-display-full-name)
 
 (defcustom cvs-allow-dir-commit nil
   "*Allow `cvs-mode-commit' on directories.
@@ -61,7 +62,7 @@ to confuse some users sometimes."
 ;;;; Faces for fontification
 ;;;;
 
-(defface cvs-header-face
+(defface cvs-header
   '((((class color) (background dark))
      (:foreground "lightyellow" :weight bold))
     (((class color) (background light))
@@ -69,8 +70,10 @@ to confuse some users sometimes."
     (t (:weight bold)))
   "PCL-CVS face used to highlight directory changes."
   :group 'pcl-cvs)
+;; backward-compatibility alias
+(put 'cvs-header-face 'face-alias 'cvs-header)
 
-(defface cvs-filename-face
+(defface cvs-filename
   '((((class color) (background dark))
      (:foreground "lightblue"))
     (((class color) (background light))
@@ -78,17 +81,21 @@ to confuse some users sometimes."
     (t ()))
   "PCL-CVS face used to highlight file names."
   :group 'pcl-cvs)
+;; backward-compatibility alias
+(put 'cvs-filename-face 'face-alias 'cvs-filename)
 
-(defface cvs-unknown-face
+(defface cvs-unknown
   '((((class color) (background dark))
-     (:foreground "red"))
+     (:foreground "red1"))
     (((class color) (background light))
-     (:foreground "red"))
+     (:foreground "red1"))
     (t (:slant italic)))
   "PCL-CVS face used to highlight unknown file status."
   :group 'pcl-cvs)
+;; backward-compatibility alias
+(put 'cvs-unknown-face 'face-alias 'cvs-unknown)
 
-(defface cvs-handled-face
+(defface cvs-handled
   '((((class color) (background dark))
      (:foreground "pink"))
     (((class color) (background light))
@@ -96,8 +103,10 @@ to confuse some users sometimes."
     (t ()))
   "PCL-CVS face used to highlight handled file status."
   :group 'pcl-cvs)
+;; backward-compatibility alias
+(put 'cvs-handled-face 'face-alias 'cvs-handled)
 
-(defface cvs-need-action-face
+(defface cvs-need-action
   '((((class color) (background dark))
      (:foreground "orange"))
     (((class color) (background light))
@@ -105,8 +114,10 @@ to confuse some users sometimes."
     (t (:slant italic)))
   "PCL-CVS face used to highlight status of files needing action."
   :group 'pcl-cvs)
+;; backward-compatibility alias
+(put 'cvs-need-action-face 'face-alias 'cvs-need-action)
 
-(defface cvs-marked-face
+(defface cvs-marked
   '((((min-colors 88) (class color) (background dark))
      (:foreground "green1" :weight bold))
     (((class color) (background dark))
@@ -116,14 +127,18 @@ to confuse some users sometimes."
     (t (:weight bold)))
   "PCL-CVS face used to highlight marked file indicator."
   :group 'pcl-cvs)
+;; backward-compatibility alias
+(put 'cvs-marked-face 'face-alias 'cvs-marked)
 
-(defface cvs-msg-face
+(defface cvs-msg
   '((t (:slant italic)))
   "PCL-CVS face used to highlight CVS messages."
   :group 'pcl-cvs)
+;; backward-compatibility alias
+(put 'cvs-msg-face 'face-alias 'cvs-msg)
 
-(defvar cvs-fi-up-to-date-face 'cvs-handled-face)
-(defvar cvs-fi-unknown-face 'cvs-unknown-face)
+(defvar cvs-fi-up-to-date-face 'cvs-handled)
+(defvar cvs-fi-unknown-face 'cvs-unknown)
 (defvar cvs-fi-conflict-face 'font-lock-warning-face)
 
 ;; There is normally no need to alter the following variable, but if
@@ -211,7 +226,8 @@ to confuse some users sometimes."
       ;; Here, I use `concat' rather than `expand-file-name' because I want
       ;; the resulting path to stay relative if `dir' is relative.
       (concat dir (cvs-fileinfo->file fileinfo)))))
-(define-obsolete-function-alias 'cvs-fileinfo->full-path 'cvs-fileinfo->full-name)
+(define-obsolete-function-alias 'cvs-fileinfo->full-path
+    'cvs-fileinfo->full-name "22.1")
 
 (defun cvs-fileinfo->pp-name (fi)
   "Return the filename of FI as it should be displayed."
@@ -332,19 +348,17 @@ For use by the cookie package."
      (case type
        (DIRCHANGE (concat "In directory "
                          (cvs-add-face (cvs-fileinfo->full-name fileinfo)
-                                       'cvs-header-face t
-                                       'cvs-goal-column t)
+                                       'cvs-header t 'cvs-goal-column t)
                          ":"))
        (MESSAGE
        (cvs-add-face (format "Message: %s" (cvs-fileinfo->full-log fileinfo))
-                     'cvs-msg-face))
+                     'cvs-msg))
        (t
        (let* ((status (if (cvs-fileinfo->marked fileinfo)
-                          (cvs-add-face "*" 'cvs-marked-face)
+                          (cvs-add-face "*" 'cvs-marked)
                         " "))
               (file (cvs-add-face (cvs-fileinfo->pp-name fileinfo)
-                                  'cvs-filename-face t
-                                  'cvs-goal-column t))
+                                  'cvs-filename t 'cvs-goal-column t))
               (base (or (cvs-fileinfo->base-rev fileinfo) ""))
               (head (cvs-fileinfo->head-rev fileinfo))
               (type
@@ -357,7 +371,7 @@ For use by the cookie package."
                                                (downcase (symbol-name type))
                                                "-face"))))
                              (or (and (boundp sym) (symbol-value sym))
-                                 'cvs-need-action-face))))
+                                 'cvs-need-action))))
                  (cvs-add-face str face cvs-status-map)))
               (side (or
                      ;; maybe a subtype
@@ -367,7 +381,8 @@ For use by the cookie package."
                      ;; or nothing
                      "")))
           (format "%-11s %s %-11s %-11s %s"
-                  side status type base file)))))))
+                  side status type base file))))
+     "\n")))
 
 
 (defun cvs-fileinfo-update (fi fi-new)