From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kiwon Um Newsgroups: gmane.emacs.help Subject: Re: forward/backward word with case sensitivity Date: Tue, 28 Jul 2009 02:27:35 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <92744345-13a4-4e5d-8f25-f6c70cd00f3a@i8g2000pro.googlegroups.com> <87tz0x8b6z.wl%anselm.helbig+news2009@googlemail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=EUC-KR Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1248774305 1172 80.91.229.12 (28 Jul 2009 09:45:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jul 2009 09:45:05 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 28 11:44:59 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MVjEw-00062n-EZ for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Jul 2009 11:44:58 +0200 Original-Received: from localhost ([127.0.0.1]:55506 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVjEv-0007Oc-Ss for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Jul 2009 05:44:57 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!d36g2000prb.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 47 Original-NNTP-Posting-Host: 163.152.71.53 Original-X-Trace: posting.google.com 1248773256 12270 127.0.0.1 (28 Jul 2009 09:27:36 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 28 Jul 2009 09:27:36 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d36g2000prb.googlegroups.com; posting-host=163.152.71.53; posting-account=6v9_LQoAAACIrmHTUxB_-iw-j364OtYr User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; ko-KR; rv:1.9.1.1) Gecko/20090717 Fedora/3.5.1-1.fc11 Firefox/3.5.1,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:171270 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: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66456 Archived-At: On 7=BF=F928=C0=CF, =BF=C0=C8=C46=BD=C300=BA=D0, Thierry Volpiatto wrote: > Anselm Helbig 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 You made a good function! Really thanks for your effort. :)