unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: emacs Fan <emacsNT@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: how to delete a line without putting them into yanking?
Date: Sat, 11 Sep 2004 00:06:53 +0900	[thread overview]
Message-ID: <5445eda004091008061b8f7a3f@mail.gmail.com> (raw)
In-Reply-To: <87fz5rfaqc.fsf@bach.composers>

On Thu, 09 Sep 2004 22:28:27 +0200, Ole Laursen <olau@hardworking.dk> wrote:
> > 3. write a lisp function to delete the path line, not kill it.
> 
> Here's one. Just put in your Emacs file and bind it to some key with
> something alongs:
> 
>  (global-set-key (kbd "C-c d") 'delete-line)
>.......
>  (interactive "P")
>  (delete-region (point)
>               (progn
>                 (if arg
>                     (forward-visible-line (prefix-numeric-value arg))
>                   (if (eobp)
>                       (signal 'end-of-buffer nil))
>                   (if (or (looking-at "[ \t]*$") (and kill-whole-line (bolp)))
>                       (forward-visible-line 1)
>                     (end-of-visible-line)))
>                 (point))))
> 
> --
> Ole Laursen
> http://www.cs.aau.dk/~olau/

It works.
Thanks, you really did it.

  parent reply	other threads:[~2004-09-10 15:06 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-09  1:43 how to delete a line without putting them into yanking? Rokia
2004-09-09  1:55 ` maddog
2004-09-09  2:17 ` emacs Fan
     [not found] ` <mailman.2061.1094696629.1998.help-gnu-emacs@gnu.org>
2004-09-09  2:42   ` Rokia
2004-09-09  3:03   ` Rokia
2004-09-09  3:34     ` emacs Fan
     [not found]     ` <mailman.2064.1094701218.1998.help-gnu-emacs@gnu.org>
2004-09-09  6:08       ` Rokia
2004-09-09 20:28       ` Ole Laursen
2004-09-10  8:54         ` Rokia
2004-09-10 13:04           ` J. David Boyd
2004-09-10 14:51           ` Mathias Dahl
2004-09-10 15:14           ` Michael Slass
2004-09-10 15:06         ` emacs Fan [this message]
2004-09-09  4:07 ` Eli Zaretskii
2004-09-09  4:30   ` emacs Fan
     [not found]   ` <mailman.2075.1094704580.1998.help-gnu-emacs@gnu.org>
2004-09-09  6:10     ` Rokia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5445eda004091008061b8f7a3f@mail.gmail.com \
    --to=emacsnt@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).