From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthew Flaschen Newsgroups: gmane.emacs.help Subject: Re: Delete (kill) entire line at cursor - how? Date: Tue, 27 Mar 2007 06:46:31 -0400 Message-ID: <4608F607.7090007@gatech.edu> References: <1173165762.936371.202290@q40g2000cwq.googlegroups.com> <87y7loy90q.fsf@localhorst.mine.nu> <46034572.9040806@gatech.edu> <200703261007.05960.aaryal@foresightint.com> <87648nm2p1.fsf@kobe.laptop> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1174992420 31822 80.91.229.12 (27 Mar 2007 10:47:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Mar 2007 10:47:00 +0000 (UTC) To: emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 27 12:46:54 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 1HW9CX-0001jA-3V for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Mar 2007 12:46:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HW9Es-0001qn-7s for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Mar 2007 05:49:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HW9Eb-0001q6-FJ for help-gnu-emacs@gnu.org; Tue, 27 Mar 2007 06:49:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HW9Ea-0001pl-Ec for help-gnu-emacs@gnu.org; Tue, 27 Mar 2007 06:49:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HW9Ea-0001pi-At for help-gnu-emacs@gnu.org; Tue, 27 Mar 2007 05:49:00 -0500 Original-Received: from deliverator7.gatech.edu ([130.207.165.169]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.60) (envelope-from ) id 1HW9CE-0006YO-98 for help-gnu-emacs@gnu.org; Tue, 27 Mar 2007 06:46:34 -0400 Original-Received: from deliverator7.gatech.edu (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id BDB60181A for ; Tue, 27 Mar 2007 06:46:32 -0400 (EDT) (envelope-from matthew.flaschen@gatech.edu) Original-Received: from mailprx4.gatech.edu (mailprx4.prism.gatech.edu [130.207.171.18]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "smtp.mail.gatech.edu", Issuer "RSA Data Security, Inc." (verified OK)) by deliverator7.gatech.edu (Postfix) with ESMTP id A2A821821 for ; Tue, 27 Mar 2007 06:46:32 -0400 (EDT) (envelope-from matthew.flaschen@gatech.edu) Original-Received: from [128.61.73.81] (r73h81.res.gatech.edu [128.61.73.81]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (sasl: method=PLAIN, username=mflaschen3@mailprx4.gatech.edu, sender=n/a) by mailprx4.gatech.edu (Postfix) with ESMTP id 755752192 for ; Tue, 27 Mar 2007 06:46:32 -0400 (EDT) (envelope-from matthew.flaschen@gatech.edu) User-Agent: Thunderbird 1.5.0.10 (X11/20070306) In-Reply-To: <87648nm2p1.fsf@kobe.laptop> X-Enigmail-Version: 0.94.3.0 X-detected-kernel: Solaris 9 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:42216 Archived-At: Giorgos Keramidas wrote: > Matthew Flaschen writes: >> anoop aryal wrote: >>> i'm sure it could be done better but here's something you can put in >>> your .emacs file: >>> >>> (defun c-kill-statement () >>> "a handy way to kill a statement even when it spans multiple lines." >>> (interactive) >>> (save-excursion >>> (c-beginning-of-statement-1) >>> (let ((start (point))) >>> (c-end-of-statement) >>> (let ((end (point))) >>> (kill-region start end))))) >> Thanks, but I really have no need for this. I was just curious >> whether emacs had such semantics built-in. > > The answer to this depends on what you mean by 'semantics'. Does the > following match, or even approximate what you had in mind? > Again, this is idle curiosity, but no. That doesn't seem to have any useful understanding of C/Java syntax. It just kills the next word. Matthew Flaschen