unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Robert J. Chassell" <bob@rattlesnake.com>
Subject: need: (defalias 'kill-grep 'kill-compilation)
Date: Sun, 26 May 2002 11:59:32 -0400 (EDT)	[thread overview]
Message-ID: <m17C0Qe-000IhJC@localhost> (raw)

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                  bob@rattlesnake.com
    Rattlesnake Enterprises             http://www.rattlesnake.com

             reply	other threads:[~2002-05-26 15:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-26 15:59 Robert J. Chassell [this message]
2002-05-27 22:56 ` need: (defalias 'kill-grep 'kill-compilation) Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m17C0Qe-000IhJC@localhost \
    --to=bob@rattlesnake.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).