185 |
If ONELINE is t, only the first line (no \\n) will be returned. |
If ONELINE is t, only the first line (no \\n) will be returned. |
186 |
If ARGS is non-nil, the file will be executed with ARGS as its |
If ARGS is non-nil, the file will be executed with ARGS as its |
187 |
arguments. If ARGS is not a list, no argument will be passed." |
arguments. If ARGS is not a list, no argument will be passed." |
188 |
(with-temp-buffer |
(condition-case nil |
189 |
(condition-case nil |
(with-temp-buffer |
190 |
(progn |
(if args |
191 |
(if args |
(apply 'call-process |
192 |
(apply 'call-process |
file nil t nil (when (listp args) args)) |
193 |
file nil t nil (when (listp args) args)) |
(insert-file-contents file)) |
194 |
(insert-file-contents file)) |
(goto-char (point-min)) |
195 |
(buffer-substring (point-min) |
(buffer-substring (point) |
196 |
(if oneline |
(if oneline (line-end-position) (point-max)))) |
197 |
(progn (goto-char (point-min)) (end-of-line) (point)) |
(file-error nil))) |
|
(point-max)))) |
|
|
(file-error nil)))) |
|
198 |
|
|
199 |
(defun cvs-string-prefix-p (str1 str2) |
(defun cvs-string-prefix-p (str1 str2) |
200 |
"Tell whether STR1 is a prefix of STR2." |
"Tell whether STR1 is a prefix of STR2." |
228 |
(append (unless (eq i 0) (split-string (substring string 0 i) sep)) |
(append (unless (eq i 0) (split-string (substring string 0 i) sep)) |
229 |
(let ((rfs (read-from-string string i))) |
(let ((rfs (read-from-string string i))) |
230 |
(cons (car rfs) |
(cons (car rfs) |
231 |
(cvs-string->strings (substring string (cdr rfs)) sep))))))) |
(cvs-string->strings (substring string (cdr rfs)) |
232 |
|
sep))))))) |
233 |
|
|
234 |
;;;; |
;;;; |
235 |
;;;; file names |
;;;; file names |