]> code.delx.au - gnu-emacs/blobdiff - lisp/pcvs-util.el
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-25
[gnu-emacs] / lisp / pcvs-util.el
index 3380077c74ae402a8ce812623966033728990b97..2cbb00b324ca9338cd06b7d1522f5f0ce9063881 100644 (file)
@@ -1,7 +1,7 @@
 ;;; pcvs-util.el --- utility functions for PCL-CVS  -*- byte-compile-dynamic: t -*-
 
-;; Copyright (C) 1991,92,93,94,95,96,97,98,99, 2000,01,04
-;;  Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+;;   2000, 2001, 2004, 2005  Free Software Foundation, Inc.
 
 ;; Author: Stefan Monnier <monnier@cs.yale.edu>
 ;; Keywords: pcl-cvs
@@ -104,11 +104,12 @@ BUF is assumed to be a temporary buffer used from the buffer MAINBUF."
            (condition-case ()
                (delete-window win)
              (error (iconify-frame (window-frame win))))
-         (if (and mainbuf (get-buffer-window mainbuf))
-             ;; FIXME: if the buffer popped into a pre-existing window,
-             ;; we don't want to delete that window.
-             t ;;(delete-window win)
-             ))))
+;;;      (if (and mainbuf (get-buffer-window mainbuf))
+;;;          ;; FIXME: if the buffer popped into a pre-existing window,
+;;;          ;; we don't want to delete that window.
+;;;          t ;;(delete-window win)
+;;;          )
+         )))
     (with-current-buffer buf
       (bury-buffer (unless (and (eq buf (window-buffer (selected-window)))
                                (not (window-dedicated-p (selected-window))))
@@ -180,9 +181,7 @@ arguments.  If ARGS is not a list, no argument will be passed."
 
 (defun cvs-string-prefix-p (str1 str2)
   "Tell whether STR1 is a prefix of STR2."
-  (let ((length1 (length str1)))
-    (and (>= (length str2) length1)
-        (string= str1 (substring str2 0 length1)))))
+  (eq t (compare-strings str2 nil (length str1) str1 nil nil)))
 
 ;; (string->strings (strings->string X)) == X
 (defun cvs-strings->string (strings &optional separator)
@@ -206,8 +205,8 @@ It understands elisp style quoting within STRING such that
 The SEPARATOR regexp defaults to \"\\s-+\"."
   (let ((sep (or separator "\\s-+"))
        (i (string-match "[\"]" string)))
-    (if (null i) (split-string string sep)     ; no quoting:  easy
-      (append (unless (eq i 0) (split-string (substring string 0 i) sep))
+    (if (null i) (split-string string sep t)   ; no quoting:  easy
+      (append (unless (eq i 0) (split-string (substring string 0 i) sep t))
              (let ((rfs (read-from-string string i)))
                (cons (car rfs)
                      (cvs-string->strings (substring string (cdr rfs))
@@ -392,5 +391,5 @@ and reset it unless READ-ONLY is non-nil."
 
 (provide 'pcvs-util)
 
-;;; arch-tag: 3b2588bb-2ae3-4f1f-bf5b-dea91b1f8a59
+;; arch-tag: 3b2588bb-2ae3-4f1f-bf5b-dea91b1f8a59
 ;;; pcvs-util.el ends here