From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Benjamin Rutt Newsgroups: gmane.emacs.help Subject: Re: Java mixed case deletion Date: Tue, 26 Oct 2004 15:23:14 -0400 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87acu91dy5.fsf@penguin.brutt.org> References: <2u7fcnF26ss6cU1@uni-berlin.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1098818858 6996 80.91.229.6 (26 Oct 2004 19:27:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 26 Oct 2004 19:27:38 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 26 21:27:24 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CMWya-0004Vf-00 for ; Tue, 26 Oct 2004 21:27:24 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CMX6I-0005Un-3X for geh-help-gnu-emacs@m.gmane.org; Tue, 26 Oct 2004 15:35:22 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!news2.telebyte.nl!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 38 Original-X-Trace: news.uni-berlin.de ThkSjKQT3KJ3e+RAqZiBFAlYTghjzNWhG619WZnDZNzJ6R9TQ= Mail-Copies-To: nobody User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:gyNXXH+ApHe/OOLSdM0dB5GE7vk= Original-Xref: shelby.stanford.edu gnu.emacs.help:126088 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:21466 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:21466 Mahesh Padmanabhan 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. -- Benjamin Rutt