Hello: Thankyou very much for yours answers. Please excuse my ignorance but I dont know exactly how tu use the code. I paste it in my .emacs file. To use I type M-x "capitalize-uppercase-words" then appears a mesage: "The mark is not set now, so there is no region". What shoul I do? Thanks again -------------------- Horacio Suarez > From: pjb@informatimago.com > Date: Thu, 13 Aug 2009 15:09:31 +0200 > To: help-gnu-emacs@gnu.org > Subject: Re: search for any two consecutive uppercase characters > > "Colin S. Miller" writes: > > > Pascal J. Bourguignon wrote: > >> Horacio Suarez writes: > >> > >>> Hello all: > >>> > >>> Is there a way to search for any two consecutive uppercase characters? In example "PÉREZ" or > >>> "GONZÁLEZ" > >> > >> Yes, this is difficult, because of the accented letters. There is no > >> [:upper:] in emacs regular expressions. It might be possible to build > >> a syntax table or something to identify uppercase letters including > >> accented ones, but AFAIK, there's nothing built in. The simpliest > >> would be to prepare a regular expression explicitely listing all the > >> characters you'd want, something like: > >> > >> "\\<[A-ZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ]+\\>" > >> > > Isn't > > C-u C-s (aka isearch-forward-regexp) > > [A-ZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞ]\{2,\} > > better? > > FSVO "better". > > > here \{2,\} > > means two (or more) of the preceding expression. > > They don't mean the same. > My expression means: words containing only uppercase letters. > Your expression means: any occurence of two or more consecutive uppercase letters. > > Is 0x42AB a word? (I'd say no, it's a number in C syntax for hexadecimal). > Is NeXTstep a word? (Yes, but it's not all uppercase). > > > -- > __Pascal Bourguignon__ _________________________________________________________________ With Windows Live, you can organize, edit, and share your photos. http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx