From: j_del_strother@hotmail.com (Jon)
Subject: Re: I don't want Ctrl-Backspace to span different lines...
Date: 16 May 2003 01:19:14 -0700 [thread overview]
Message-ID: <445cd6bf.0305160019.48b2c740@posting.google.com> (raw)
In-Reply-To: 84llx8whzi.fsf@lucy.is.informatik.uni-duisburg.de
kai.grossjohann@gmx.net (Kai Großjohann) wrote in message news:<84llx8whzi.fsf@lucy.is.informatik.uni-duisburg.de>...
> j_del_strother@hotmail.com (Jon) writes:
>
> > Is there any way to prevent Ctrl-Backspace & Ctrl-Delete from spanning
> > lines?
>
> You have to write Lisp code. For example,
>
> (defun jon-kill-word (n)
> "Kill N words or to end of line, whichever comes first."
> (interactive "p")
> (let ((eol (point-at-eol))
> (nwords (save-excursion (forward-word n) (point))))
> (kill-region (point) (min eol nwords))))
>
> (defun jon-backward-kill-word (n)
> "Kill N words backward or to beginning of line, whichever comes first."
> (interactive "p")
> (let ((bol (point-at-bol))
> (nwords (save-excursion (backward-word n) (point))))
> (kill-region (point) (max (bol nwords)))))
>
> If these commands do what you want, you can bind them to keys you like.
Well, I don't have a clue about writing Lisp, but fortunately your
samples worked perfectly.
Thanks for the help,
Jon
next prev parent reply other threads:[~2003-05-16 8:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-15 10:39 I don't want Ctrl-Backspace to span different lines Jon
2003-05-15 11:45 ` Kai Großjohann
2003-05-16 8:19 ` Jon [this message]
2003-05-17 19:52 ` Kai Großjohann
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=445cd6bf.0305160019.48b2c740@posting.google.com \
--to=j_del_strother@hotmail.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.