From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: forward/backward word with case sensitivity Date: Tue, 28 Jul 2009 11:00:52 +0200 Organization: ThierryVolpiatto Message-ID: <87tz0xfagr.fsf@tux.homenetwork> 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=us-ascii X-Trace: ger.gmane.org 1248772625 27748 80.91.229.12 (28 Jul 2009 09:17:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jul 2009 09:17: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:16: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 1MVink-0003Bh-C8 for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Jul 2009 11:16:52 +0200 Original-Received: from localhost ([127.0.0.1]:58589 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVinj-0002MV-Jk for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Jul 2009 05:16:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MViej-0008DN-GT for help-gnu-emacs@gnu.org; Tue, 28 Jul 2009 05:07:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MViee-0008BM-SV for help-gnu-emacs@gnu.org; Tue, 28 Jul 2009 05:07:32 -0400 Original-Received: from [199.232.76.173] (port=57246 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MViee-0008BF-Lr for help-gnu-emacs@gnu.org; Tue, 28 Jul 2009 05:07:28 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:52098 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MViea-0000hy-97 for help-gnu-emacs@gnu.org; Tue, 28 Jul 2009 05:07:28 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MVieX-00030y-9x for help-gnu-emacs@gnu.org; Tue, 28 Jul 2009 09:07:21 +0000 Original-Received: from 194.77.197-77.rev.gaoland.net ([77.197.77.194]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Jul 2009 09:07:21 +0000 Original-Received: from thierry.volpiatto by 194.77.197-77.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Jul 2009 09:07:21 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 44 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 194.77.197-77.rev.gaoland.net Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEUHAwNfJRBVTESlTym0 RB/OwKFivhZqAAAACXBIWXMAAAsSAAALEgHS3X78AAAACXZwQWcAAAAwAAAAMADO7oxXAAABeElE QVQ4y3VTW47CMAyMwwUyTfYfUvG/wfC/ET4B0t7/KmsHurRgXFVVPRm/xglhsRj2+npW98G3+Amp tS5BXxl3SqzcXGRuEyf7n5lPA9jXetNPRhE7EJkzfz8YWnIgBSwW95TK4H79/t4GINKNADWj4PgA DiJX/ZxFDzDXeb4oYMw7kNUvyMzcaj3ioICG4hCKEShkPpwQ49Q05nnkGAQLDFDdExjm0qpowBYA Wi61bDlFU1GW0WbY2dSJYX5ZD2S0AiZL+rPyE19TpMzP2IvNWly+NkuWNgD4pO2oL73IQXoSyVX2 NHna7tgadWRXoCdvf2guqEcvGHqZwE520iRD0/QCYiiTE+U21w1Qxvg6iSp9fbIiDCnSAelDkCVF Vn+HekqXzRybwJ40xF4DMRG6SWGK9G1lYzHSxLYEm05GWbpJCB6A9tb9A3BGn2XdwJbS/WuInj74 4QNF8sVFdP3vl+5tgYp4Ev7fyrfFMkXgElDgV4uV/w8TWEeLCIGJ/AAAACV0RVh0Y3JlYXRlLWRh dGUAMjAwOC0wNS0zMVQyMjoxNDoyMiswMjowMM7uH/IAAAARdEVYdGpwZWc6Y29sb3JzcGFjZQAy LHVVnwAAACB0RVh0anBlZzpzYW1wbGluZy1mYWN0b3IAMngyLDF4MSwxeDFJ+qa0AAAAJXRFWHRt b2RpZnktZGF0ZQAyMDA3LTEwLTI4VDE3OjA4OjQ4KzAxOjAwhqNSRgAAAABJRU5ErkJggg== User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:t9qJhZFAfkNIlqKSysQYRJgwZ/s= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:66453 Archived-At: 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