From: kgold@watson.ibm.com (kgold)
Subject: Re: kill-region and white space
Date: 1 Sep 2004 13:31:54 GMT [thread overview]
Message-ID: <4135cf4a_3@news1.prserv.net> (raw)
In-Reply-To: 413495D4.9090106@yahoo.com
Kevin Rodgers <ihs_4664@yahoo.com> writes:
> kgold wrote:
> > I set mouse-3 to kill-region, and mouse-2 to mouse-yank-at-click. So
> > I can cut and paste using only the mouse.
> >
> > mouse-1 double click selects a word, so I'd like to be able to select,
> > cut, and paste a word using the mouse. However, the double click
> > doesn't select the white space after the word. I grabbed this code for
> > kill-word to do what I want. Is there something similar for mouse-1
> > double click?
> >
> > (defadvice kill-word (after delete-horizontal-space activate)
> > "Delete trailing whitespace as well."
> > (if (looking-at "\\s ")
> > (just-one-space)))
>
> Why not advise kill-region similarly, since that's what you've bound
> mouse-3 to?
Here's what I tried. They both kill correctly, but the yank does not
yank the whitespace. I think I need the mouse-1 double click to
select the word and the whitespace after it.
That is, I think the problem and solution involve the select, not the
kill.
(defadvice kill-region (after delete-horizontal-space activate)
"Delete trailing whitespace as well."
(if (looking-at "\\s ")
(just-one-space)))
next prev parent reply other threads:[~2004-09-01 13:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-30 18:18 kill-region and white space kgold
2004-08-31 15:14 ` Kevin Rodgers
2004-09-01 13:31 ` kgold [this message]
2004-09-01 16:16 ` Kevin Rodgers
2004-09-01 18:47 ` kgold
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=4135cf4a_3@news1.prserv.net \
--to=kgold@watson.ibm.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.
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).