From: Mahesh Padmanabhan <mahesh@privacy.net>
Subject: Re: Java mixed case deletion
Date: Tue, 26 Oct 2004 13:52:44 -0600 [thread overview]
Message-ID: <2u7o8dF27ffs0U1@uni-berlin.de> (raw)
In-Reply-To: <87acu91dy5.fsf@penguin.brutt.org>
Benjamin Rutt wrote:
> Mahesh Padmanabhan <mahesh@privacy.net> writes:
>
>
>>The functions c-forward-into-nomenclature and
>>c-backward-into-nomenclature take care of negotiating mixed case words
>>but i could not find anything that allows me to delete while keeping
>>mixed case in mind.
>>
>>For example - if there is a word like this: SomeClass then a backward
>>delete word deletes the whole word. What I want is to delete just
>>Class in SomeClass.
>
>
> (defun my-c-kill-forward-into-nomenclature (&optional arg)
> "Kill forward to the end of a nomenclature section or word. With
> arg, do it arg times."
> (interactive "p")
> (save-excursion
> (set-mark (point))
> (c-forward-into-nomenclature arg)
> (kill-region (mark) (point))))
>
> (defun my-c-kill-backward-into-nomenclature (&optional arg)
> "Kill backward to the beginning of a nomenclature section or word.
> th arg, do it arg times."
> (interactive "p")
> (save-excursion
> (set-mark (point))
> (c-backward-into-nomenclature arg)
> (kill-region (mark) (point))))
>
> Add those to your keys of choice in the hook and you're all set. I
> use
>
> (local-set-key [(control backspace)] 'my-c-kill-backward-into-nomenclature)
> (local-set-key [(meta d)] 'my-c-kill-forward-into-nomenclature)
>
> inside my c-mode-common-hook, personally.
Thanks!
next prev parent reply other threads:[~2004-10-26 19:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-26 17:21 Java mixed case deletion Mahesh Padmanabhan
2004-10-26 19:23 ` Benjamin Rutt
2004-10-26 19:52 ` Mahesh Padmanabhan [this message]
2004-10-26 22:41 ` Kevin Rodgers
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=2u7o8dF27ffs0U1@uni-berlin.de \
--to=mahesh@privacy.net \
/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.