Function: etags-regen--process-file-region
etags-regen--process-file-region is a byte-compiled function defined
in etags-regen.el.gz.
Signature
(etags-regen--process-file-region START END PROGRAM &optional OUTPUT-BUFFER ERROR-BUFFER &rest ARGS)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/etags-regen.el.gz
(defun etags-regen--process-file-region ( start end program
&optional output-buffer error-buffer
&rest args)
(let ((error-file (and error-buffer (make-temp-file "erpfr-err")))
infile)
(unwind-protect
(progn
(if (not (file-remote-p default-directory))
(if (and start end)
(apply #'call-process-region
start end program nil
(list output-buffer error-file) nil args)
(apply #'call-process
program nil (list output-buffer error-file) nil args))
(when (and start end)
(setq infile (make-temp-file "erpfr"))
(write-region start end infile nil 'silent))
(apply #'process-file
program infile (list output-buffer error-file) nil args))
(when (and error-file
(file-exists-p error-file)
(< 0 (file-attribute-size (file-attributes error-file))))
(with-current-buffer (get-buffer-create error-buffer)
(erase-buffer)
(format-insert-file error-file nil)
(display-buffer (current-buffer)))))
(if infile (delete-file infile))
(if error-file (delete-file error-file)))))