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: Mathias Dahl
Subject: Re: Delete (kill) entire line at cursor - how?
Date: Mon, 26 Mar 2007 23:55:03 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.94 (windows-nt)

David Hansen <address@hidden> 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


reply via email to

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