emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grep /dev/null


From: Kevin Rodgers
Subject: Re: grep /dev/null
Date: Wed, 09 Feb 2005 10:06:14 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

Richard Stallman wrote:
>     With respect to compile, I posted a patch back in October 1996 that
> defines a new variable (compile-disable-input) and sends an EOF to the > compilation process if it is non-nil (which it is, by default). I also
>     posted a compilation-mode-hook function (compile-enable-input) that
>     allows the user to run compilations that require input by emulating
>     comint-mode in the *compilation* buffer.
>
> Could you adapt these to the current version of compile.el?

Sure, here's the first part:


2005-02-09  Kevin Rodgers  <address@hidden>

        * progmodes/compile.el (compilation-disable-input): New option.
        (compilation-start): If it's non-nil, send an EOF to the process.


*** compile.el~ Wed Feb  9 09:41:47 2005
--- compile.el  Wed Feb  9 09:56:59 2005
***************
*** 860,865 ****
--- 860,873 ----
      (compilation-start command nil name-function highlight-regexp)))
  (make-obsolete 'compile-internal 'compilation-start)

+ (defcustom compilation-disable-input t
+   "*If non-nil, send end-of-file as compilation process input.
+ This only affects platforms that support asynchronous processes (see
+ start-process); synchronous compilation processes never accept input."
+   :type 'boolean
+   :group 'compilation
+   :version "22.1")
+
(defun compilation-start (command &optional mode name-function highlight-regexp)
    "Run compilation command COMMAND (low level interface).
If COMMAND starts with a cd command, that becomes the `default-directory'.
***************
*** 974,979 ****
--- 982,989 ----
                                                       outbuf command))))
              ;; Make the buffer's mode line show process state.
              (setq mode-line-process '(":%s"))
+             (when compilation-disable-input
+                 (process-send-eof proc))
              (set-process-sentinel proc 'compilation-sentinel)
              (set-process-filter proc 'compilation-filter)
              (set-marker (process-mark proc) (point) outbuf)

--
Kevin Rodgers





reply via email to

[Prev in Thread] Current Thread [Next in Thread]