comparison lisp/pcvs-util.el @ 89971:cce1c0ee76ee

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-36 Merge from emacs--cvs-trunk--0, emacs--gnus--5.10, gnus--rel--5.10 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523 Merge from emacs--gnus--5.10, gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-524 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-534 Update from CVS * miles@gnu.org--gnu-2004/emacs--gnus--5.10--base-0 tag of miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-464 * miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-1 Import from CVS branch gnus-5_10-branch * miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-2 Merge from lorentey@elte.hu--2004/emacs--multi-tty--0, emacs--cvs-trunk--0 * miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-3 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/emacs--gnus--5.10--patch-4 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-18 Update from CVS * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-19 Remove autoconf-generated files from archive * miles@gnu.org--gnu-2004/gnus--rel--5.10--patch-20 Update from CVS
author Miles Bader <miles@gnu.org>
date Thu, 09 Sep 2004 09:36:36 +0000
parents 4c90ffeb71c5 14b1949ce3d4
children f3ec05478165
comparison
equal deleted inserted replaced
89970:a849e5779b8c 89971:cce1c0ee76ee
1 ;;; pcvs-util.el --- utility functions for PCL-CVS -*- byte-compile-dynamic: t -*- 1 ;;; pcvs-util.el --- utility functions for PCL-CVS -*- byte-compile-dynamic: t -*-
2 2
3 ;; Copyright (C) 1991,92,93,94,95,96,97,98,99, 2000,01,04 3 ;; Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4 ;; Free Software Foundation, Inc. 4 ;; 2000, 2001, 2004 Free Software Foundation, Inc.
5 5
6 ;; Author: Stefan Monnier <monnier@cs.yale.edu> 6 ;; Author: Stefan Monnier <monnier@cs.yale.edu>
7 ;; Keywords: pcl-cvs 7 ;; Keywords: pcl-cvs
8 8
9 ;; This file is part of GNU Emacs. 9 ;; This file is part of GNU Emacs.
178 (if oneline (line-end-position) (point-max)))) 178 (if oneline (line-end-position) (point-max))))
179 (file-error nil))) 179 (file-error nil)))
180 180
181 (defun cvs-string-prefix-p (str1 str2) 181 (defun cvs-string-prefix-p (str1 str2)
182 "Tell whether STR1 is a prefix of STR2." 182 "Tell whether STR1 is a prefix of STR2."
183 (let ((length1 (length str1))) 183 (eq t (compare-strings str2 nil (length str1) str1 nil nil)))
184 (and (>= (length str2) length1)
185 (string= str1 (substring str2 0 length1)))))
186 184
187 ;; (string->strings (strings->string X)) == X 185 ;; (string->strings (strings->string X)) == X
188 (defun cvs-strings->string (strings &optional separator) 186 (defun cvs-strings->string (strings &optional separator)
189 "Concatenate the STRINGS, adding the SEPARATOR (default \" \"). 187 "Concatenate the STRINGS, adding the SEPARATOR (default \" \").
190 This tries to quote the strings to avoid ambiguity such that 188 This tries to quote the strings to avoid ambiguity such that
390 (set sym nil) 388 (set sym nil)
391 (force-mode-line-update)))) 389 (force-mode-line-update))))
392 390
393 (provide 'pcvs-util) 391 (provide 'pcvs-util)
394 392
395 ;;; arch-tag: 3b2588bb-2ae3-4f1f-bf5b-dea91b1f8a59 393 ;; arch-tag: 3b2588bb-2ae3-4f1f-bf5b-dea91b1f8a59
396 ;;; pcvs-util.el ends here 394 ;;; pcvs-util.el ends here