From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.help Subject: Re: Delete (kill) entire line at cursor - how? Date: Tue, 27 Mar 2007 12:54:34 +0300 Organization: SunSITE.dk - Supporting Open source Message-ID: <87648nm2p1.fsf@kobe.laptop> References: <1173165762.936371.202290@q40g2000cwq.googlegroups.com> <87y7loy90q.fsf@localhorst.mine.nu> <46034572.9040806@gatech.edu> <200703261007.05960.aaryal@foresightint.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1174991896 28877 80.91.229.12 (27 Mar 2007 10:38:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Mar 2007 10:38:16 +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 12:38:08 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 1HW942-0005iy-Qf for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Mar 2007 12:38:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HW96N-00034z-Ej for geh-help-gnu-emacs@m.gmane.org; Tue, 27 Mar 2007 05:40:31 -0500 Original-Path: shelby.stanford.edu!newshub.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news.astraweb.com!newsrouter-eu.astraweb.com!hwmnpeer01.ams!news.highwinds-media.com!feed.xsnews.nl!border-1.ams.xsnews.nl!border1.nntp.ams.giganews.com!nntp.giganews.com!uio.no!hist.no!news.net.uni-c.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (berkeley-unix) Cancel-Lock: sha1:n9rP7bAkVB4qd41LUn1DePOBE1w= Original-Lines: 31 Original-NNTP-Posting-Host: 62.103.39.229 Original-X-Trace: news.sunsite.dk DXC=njBoDd=GRRbMMDg2]64EMfYSB=nbEKnkkl:4`YVO27`oL^Mjg2:ak; I7eU]gGb30c[>DY7k4OKE^iaRF`f Original-X-Complaints-To: staff@sunsite.dk Original-Xref: shelby.stanford.edu gnu.emacs.help:146611 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:42215 Archived-At: 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? ,---[ C-h f kill-sexp RET ]--------------------------------------------- | kill-sexp is an interactive compiled Lisp function in `lisp.el'. | It is bound to C-M-k. | (kill-sexp &optional ARG) | | Kill the sexp (balanced expression) following point. | With ARG, kill that many sexps after point. | Negative arg -N means kill N sexps before point. `-----------------------------------------------------------------------