From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Robert J. Chassell" Newsgroups: gmane.emacs.devel Subject: need: (defalias 'kill-grep 'kill-compilation) Date: Sun, 26 May 2002 11:59:32 -0400 (EDT) Sender: emacs-devel-admin@gnu.org Message-ID: Reply-To: bob@rattlesnake.com NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1022429506 4141 127.0.0.1 (26 May 2002 16:11:46 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 26 May 2002 16:11:46 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17C0cU-00014g-00 for ; Sun, 26 May 2002 18:11:46 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17C0tP-0004Zl-00 for ; Sun, 26 May 2002 18:29:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17C0cy-000727-00; Sun, 26 May 2002 12:12:16 -0400 Original-Received: from megalith.rattlesnake.com ([140.186.114.245] helo=localhost) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17C0a1-0006x3-00 for ; Sun, 26 May 2002 12:09:13 -0400 Original-Received: by rattlesnake.com via sendmail from stdin id (Debian Smail3.2.0.114) Sun, 26 May 2002 11:59:32 -0400 (EDT) Original-To: emacs-devel@gnu.org Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:4395 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:4395 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