aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2001-12-02 07:41:47 +0000
committerStefan Monnier2001-12-02 07:41:47 +0000
commit6d57b1a37af800e68b4a3ea41236915938b623d8 (patch)
tree284b6ea233c1dc55d2b0ec307c90b649971aa986
parentca0a7168b29e1d5cb88aeedf05826d5ee60d15b3 (diff)
downloademacs-6d57b1a37af800e68b4a3ea41236915938b623d8.tar.gz
emacs-6d57b1a37af800e68b4a3ea41236915938b623d8.zip
(cvs-file-to-string): Move condition-case outside.
-rw-r--r--lisp/pcvs-util.el27
1 files changed, 13 insertions, 14 deletions
diff --git a/lisp/pcvs-util.el b/lisp/pcvs-util.el
index 9b1768f32e7..4a6a3979f73 100644
--- a/lisp/pcvs-util.el
+++ b/lisp/pcvs-util.el
@@ -5,7 +5,7 @@
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;; Revision: $Id: pcvs-util.el,v 1.14 2001/10/03 20:28:01 monnier Exp $ 8;; Revision: $Id: pcvs-util.el,v 1.15 2001/11/17 00:48:14 monnier Exp $
9 9
10;; This file is part of GNU Emacs. 10;; This file is part of GNU Emacs.
11 11
@@ -185,18 +185,16 @@ Uses columns to keep the listing readable but compact."
185If ONELINE is t, only the first line (no \\n) will be returned. 185If ONELINE is t, only the first line (no \\n) will be returned.
186If ARGS is non-nil, the file will be executed with ARGS as its 186If ARGS is non-nil, the file will be executed with ARGS as its
187arguments. If ARGS is not a list, no argument will be passed." 187arguments. If ARGS is not a list, no argument will be passed."
188 (with-temp-buffer 188 (condition-case nil
189 (condition-case nil 189 (with-temp-buffer
190 (progn 190 (if args
191 (if args 191 (apply 'call-process
192 (apply 'call-process 192 file nil t nil (when (listp args) args))
193 file nil t nil (when (listp args) args)) 193 (insert-file-contents file))
194 (insert-file-contents file)) 194 (goto-char (point-min))
195 (buffer-substring (point-min) 195 (buffer-substring (point)
196 (if oneline 196 (if oneline (line-end-position) (point-max))))
197 (progn (goto-char (point-min)) (end-of-line) (point)) 197 (file-error nil)))
198 (point-max))))
199 (file-error nil))))
200 198
201(defun cvs-string-prefix-p (str1 str2) 199(defun cvs-string-prefix-p (str1 str2)
202 "Tell whether STR1 is a prefix of STR2." 200 "Tell whether STR1 is a prefix of STR2."
@@ -230,7 +228,8 @@ The SEPARATOR regexp defaults to \"\\s-+\"."
230 (append (unless (eq i 0) (split-string (substring string 0 i) sep)) 228 (append (unless (eq i 0) (split-string (substring string 0 i) sep))
231 (let ((rfs (read-from-string string i))) 229 (let ((rfs (read-from-string string i)))
232 (cons (car rfs) 230 (cons (car rfs)
233 (cvs-string->strings (substring string (cdr rfs)) sep))))))) 231 (cvs-string->strings (substring string (cdr rfs))
232 sep)))))))
234 233
235;;;; 234;;;;
236;;;; file names 235;;;; file names