From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mathias Dahl Newsgroups: gmane.emacs.help Subject: Re: Delete (kill) entire line at cursor - how? Date: Mon, 26 Mar 2007 23:55:03 +0200 Message-ID: References: <1173165762.936371.202290@q40g2000cwq.googlegroups.com> <1173262427.110517.198500@q40g2000cwq.googlegroups.com> <200703141138.33959.aaryal@foresightint.com> <46032D86.2060508@gatech.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1174948699 1031 80.91.229.12 (26 Mar 2007 22:38:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Mar 2007 22:38:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 27 00:38:13 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HVxpM-0004bB-NT for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Mar 2007 00:38:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HVxrd-0001NW-IH for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Mar 2007 17:40:33 -0500 Original-Path: shelby.stanford.edu!newshub.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 17 Original-X-Trace: individual.net 0LYLZCVMMpKP+Je1MFoeTgswoOYu+RHd0d5MLBVl0+cVoSm5/b User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (windows-nt) Cancel-Lock: sha1:POHyVHm+ozjlNGLttk/kzhlCP7E= Original-Xref: shelby.stanford.edu gnu.emacs.help:146603 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:42207 Archived-At: David Hansen writes: > There are `c-beginning-of-statement' and `c-end-of-statement'. The > rest is left as an exercise to the reader. I needed some exercise :) (defun c-kill-statement () (interactive) (kill-region (save-excursion (c-beginning-of-statement 1) (point)) (save-excursion (c-end-of-statement 1) (point)))) /Mathias