help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delete (kill) entire line at cursor - how?


From: Giorgos Keramidas
Subject: Re: Delete (kill) entire line at cursor - how?
Date: Tue, 27 Mar 2007 12:54:34 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (berkeley-unix)

Matthew Flaschen <address@hidden> 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.
`-----------------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]