emacs-devel
[Top][All Lists]
Advanced

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

need: (defalias 'kill-grep 'kill-compilation)


From: Robert J. Chassell
Subject: need: (defalias 'kill-grep 'kill-compilation)
Date: Sun, 26 May 2002 11:59:32 -0400 (EDT)

According to Info, GNU Emacs possesses a `kill-grep' command:

    File: emacs,  Node: Compilation  says:

    `M-x kill-compilation'
    `M-x kill-grep'
         Kill the running compilation or `grep' subprocess.

However, today's CVS snapshot, Sun, 2002 May 26 13:09 UTC, 
GNU Emacs 21.3.50.1 (i686-pc-linux-gnu, X toolkit), lacks `kill-grep'.

Perhaps all that is needed is to add

    (defalias 'kill-grep 'kill-compilation)

to the    lisp/progmodes/compile.el    file.  

However, adding the `defalias' provides `kill-grep' with the same
documentation as `kill-compilation':

    Kill the process made by the M-x compile command.

This is wrong.  One can rewrite the `kill-compilation' defun for
`kill-grep', but that seems a bit excessive.  Is there a short way to
defalias `kill-grep'?

On the other hand, if a defun for `kill-grep' is a good idea, I think
this will do:

    (defun kill-grep ()
      "Kill the process made by the \\[grep] command."
      (interactive)
      (let ((buffer (compilation-find-buffer)))
        (if (get-buffer-process buffer)
            (interrupt-process (get-buffer-process buffer))
          (error "The grep process is not running"))))

What should be done?

--
    Robert J. Chassell                  address@hidden
    Rattlesnake Enterprises             http://www.rattlesnake.com



reply via email to

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