diff 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
line wrap: on
line diff
--- a/lisp/code-process.el	Sun Jul 14 23:00:16 2002 +0000
+++ b/lisp/code-process.el	Sun Jul 14 23:09:40 2002 +0000
@@ -175,7 +175,9 @@
 	(e (and deletep (copy-marker end))))
     (apply #'call-process program (list (current-buffer) start end)
 	   buffer displayp args)
-    (if deletep (delete-region s e))))
+    ; If start and end were the same originally, s will be beyond e now
+    (if (and deletep (> e s))
+	(delete-region s e))))
 
 (defun start-process (name buffer program &rest program-args)
   "Start a program in a subprocess.  Return the process object for it.