From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: forward/backward word with case sensitivity
Date: Tue, 28 Jul 2009 11:00:52 +0200 [thread overview]
Message-ID: <87tz0xfagr.fsf@tux.homenetwork> (raw)
In-Reply-To: 87tz0x8b6z.wl%anselm.helbig+news2009@googlemail.com
Anselm Helbig <anselm.helbig+news2009@googlemail.com> writes:
> Hi!
>
>> I'm wondering how to use the case sensitive buffer editing in buffer.
>> For example, in the kill-word function (M-d), how I can set it to kill
>> up to the final lower case, not space, comma, etc. as follows:
>> testFunction()
>> ^ (Here, M-d)
>> Function()
>
> I'm using c-subword-mode with ruby, to this end I've got this line in
> my .emacs:
>
> (add-hook 'ruby-mode-hook (lambda () (c-subword-mode 1)))
>
> You can try it out yourself with M-x subword-mode. This doesn't only
> affect `kill-word' but changes emacs notion about what a word is in
> the current buffer, so `forward-word' and `backward-word' are affected
> as well.
>
> HTH,
You can also write your own functions:
Something like that... (should be better, i wrote that on the fly)
,----
| (defun tv-delete-forward-to-first-upper-case ()
| (interactive)
| (let ((case-fold-search nil)
| (beg (point))
| end)
| (while (not (looking-at "[A-Z]")) (forward-char 1))
| (setq end (point))
| (delete-region beg end)))
`----
> Anselm
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France
next prev parent reply other threads:[~2009-07-28 9:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-28 7:16 forward/backward word with case sensitivity Kiwon Um
2009-07-28 7:37 ` Thierry Volpiatto
[not found] ` <mailman.3306.1248767060.2239.help-gnu-emacs@gnu.org>
2009-07-28 8:01 ` Kiwon Um
2009-07-28 8:27 ` Anselm Helbig
2009-07-28 9:00 ` Thierry Volpiatto [this message]
2009-07-28 9:25 ` Kiwon Um
[not found] ` <mailman.3312.1248772055.2239.help-gnu-emacs@gnu.org>
2009-07-28 9:27 ` Kiwon Um
2009-07-28 10:21 ` Elena
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=87tz0xfagr.fsf@tux.homenetwork \
--to=thierry.volpiatto@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).