comparison lisp/code-process.el @ 922:0288e82c84b3

[xemacs-hg @ 2002-07-14 23:09:39 by mta] code-process.el (call-process-region): Don't delete the process output if start equals end
author mta
date Sun, 14 Jul 2002 23:09:40 +0000
parents b5278486690c
children 13305f7e85f0
comparison
equal deleted inserted replaced
921:5fc81edb7a38 922:0288e82c84b3
173 ;; of the region. 173 ;; of the region.
174 (let ((s (and deletep (copy-marker start t))) 174 (let ((s (and deletep (copy-marker start t)))
175 (e (and deletep (copy-marker end)))) 175 (e (and deletep (copy-marker end))))
176 (apply #'call-process program (list (current-buffer) start end) 176 (apply #'call-process program (list (current-buffer) start end)
177 buffer displayp args) 177 buffer displayp args)
178 (if deletep (delete-region s e)))) 178 ; If start and end were the same originally, s will be beyond e now
179 (if (and deletep (> e s))
180 (delete-region s e))))
179 181
180 (defun start-process (name buffer program &rest program-args) 182 (defun start-process (name buffer program &rest program-args)
181 "Start a program in a subprocess. Return the process object for it. 183 "Start a program in a subprocess. Return the process object for it.
182 NAME is name for process. It is modified if necessary to make it unique. 184 NAME is name for process. It is modified if necessary to make it unique.
183 BUFFER is the buffer or (buffer-name) to associate with the process. 185 BUFFER is the buffer or (buffer-name) to associate with the process.