]> code.delx.au - gnu-emacs/blobdiff - lisp/vc/pcvs-parse.el
* mh-e.texi (VERSION, EDITION, UPDATED, UPDATE-MONTH): Update for
[gnu-emacs] / lisp / vc / pcvs-parse.el
index 560a270a7313c7d93a3648b6bd02752ce89c18d4..c267f32b2d76950cea5a0d6c0919e19df57663e4 100644 (file)
@@ -1,7 +1,6 @@
 ;;; pcvs-parse.el --- the CVS output parser
 
-;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-;;   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1991-2013 Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <monnier@iro.umontreal.ca>
 ;; Keywords: pcl-cvs
@@ -33,8 +32,6 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'cl))
-
 (require 'pcvs-util)
 (require 'pcvs-info)
 
@@ -118,7 +115,7 @@ If RE matches, advance the point until the line after the match and
 then assign the variables as specified in MATCHES (via `setq')."
   (cons 'cvs-do-match
        (cons re (mapcar (lambda (match)
-                          `(cons ',(first match) ,(second match)))
+                          `(cons ',(car match) ,(cadr match)))
                         matches))))
 
 (defun cvs-do-match (re &rest matches)
@@ -151,8 +148,8 @@ Match RE and if successful, execute MATCHES."
     (cvs-or
      (funcall parse-spec)
 
-     (dolist (re cvs-parse-ignored-messages)
-       (when (cvs-match re) (return t)))
+     (cl-dolist (re cvs-parse-ignored-messages)
+       (when (cvs-match re) (cl-return t)))
 
      ;; This is a parse error.  Create a message-type fileinfo.
      (and
@@ -222,7 +219,7 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'."
       ;; ?: Unknown file.
       (let ((code (aref c 0)))
        (cvs-parsed-fileinfo
-        (case code
+        (pcase code
           (?M 'MODIFIED)
           (?A 'ADDED)
           (?R 'REMOVED)
@@ -239,7 +236,7 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'."
                (if (re-search-forward "^<<<<<<< " nil t)
                    'CONFLICT 'NEED-MERGE))))
           (?J 'NEED-MERGE)             ;not supported by standard CVS
-          ((?U ?P)
+          ((or ?U ?P)
            (if dont-change-disc 'NEED-UPDATE
              (cons 'UP-TO-DATE (if (eq code ?U) 'UPDATED 'PATCHED)))))
         path 'trust)))
@@ -424,14 +421,14 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'."
        (cvs-match "restoring \\(.*\\) from backup file .*$" (path 1))))
       t)
 
-     ;; Is it a succesful merge?
+     ;; Is it a successful merge?
      ;; Figure out result of merging (ie, was there a conflict?)
      (let ((qfile (regexp-quote path)))
        (cvs-or
        ;; Conflict
        (and
         (cvs-match (concat "C \\(.*" qfile "\\)$") (path 1) (type 'CONFLICT))
-        ;; C might be followed by a "suprious" U for non-mergeable files
+        ;; C might be followed by a "spurious" U for non-mergable files
         (cvs-or (cvs-match (concat "U \\(.*" qfile "\\)$")) t))
        ;; Successful merge
        (cvs-match (concat "M \\(.*" qfile "\\)$") (path 1))
@@ -535,5 +532,4 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'."
 
 (provide 'pcvs-parse)
 
-;; arch-tag: 35418375-1a23-40a0-957d-96b0262f91d6
 ;;; pcvs-parse.el ends here