* need: (defalias 'kill-grep 'kill-compilation)
@ 2002-05-26 15:59 Robert J. Chassell
2002-05-27 22:56 ` Richard Stallman
0 siblings, 1 reply; 2+ messages in thread
From: Robert J. Chassell @ 2002-05-26 15:59 UTC (permalink / 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: need: (defalias 'kill-grep 'kill-compilation)
2002-05-26 15:59 need: (defalias 'kill-grep 'kill-compilation) Robert J. Chassell
@ 2002-05-27 22:56 ` Richard Stallman
0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2002-05-27 22:56 UTC (permalink / raw)
Cc: emacs-devel
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'?
Since kill-compilation actually kills processes made with M-x grep too,
I think that doc string should be changed to fit both cases.
Then the simple defalias would do the job.
Could you do that?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-05-27 22:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-26 15:59 need: (defalias 'kill-grep 'kill-compilation) Robert J. Chassell
2002-05-27 22:56 ` Richard Stallman
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).