Subject: bug#7952: 24.0.50; crash in find_interval

From: Chong Yidong <[email-masked]>
Date: Sun, 08 May 2011 16:27:15 -0400

Eli Zaretskii <[email-masked]> writes:

> Thanks, but will that solution work when start-process is not
> available (MS-DOS)?  I'm not sure (I think compilation-filter is not
> run in that case).

Good point.  This problem isn't limited to grep.  For the synchronous
case, compilation-start should probably run compilation-filter-hook
after call-process returns.  WDYT?

*** lisp/progmodes/compile.el	2011-05-08 05:17:17 +0000
--- lisp/progmodes/compile.el	2011-05-08 20:25:38 +0000
***************
*** 1623,1630 ****
--- 1623,1632 ----
  	    ;; regardless of where the user sees point.
  	    (goto-char (point-max))
  	    (let* ((inhibit-read-only t) ; call-process needs to modify outbuf
+ 		   (compilation-filter-start (point))
  		   (status (call-process shell-file-name nil outbuf nil "-c"
  					 command)))
+ 	      (run-hooks 'compilation-filter-hook)
  	      (cond ((numberp status)
  		     (compilation-handle-exit
  		      'exit status