[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: newbie elisp question
From: |
Pascal Bourguignon |
Subject: |
Re: newbie elisp question |
Date: |
Thu, 08 Sep 2005 06:19:40 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
"B. T. Raven" <ecinmn@peoplepc.com> writes:
> [...]
> (defun goto-vowel
> "Skip to next vowel after point."
> (interactive)
> (while (not (vowelp (char-after))) (forward-char))
> )
> [...]
> What am I not understanding here?
Drew answered why.
I'll add that you could use looking-at:
(defun goto-vowel ()
"Skip to next vowel after point."
(interactive)
(while (not (looking-at "[aeiouy]") (forward-char)))
More over, only in iso-8859-1 there are a lot of other vowels:
ÀÁÂÃÄÅÆÈÉÊËÌÍÎÏÒÓÔÕÖØÙÚÛÜÝàáâãäåæèéêëìíîïòóôõöøùúûüýÿ
(and what about semi-vowels like y? In some languages it's considered
a plain vowel).
One would hope to be able to use the character categories and match \C1 as in:
(while (looking-at "\\C1") (forward-char))
unfortunately, in the default category table, the consonant/vowel
attribute is not set for ASCII characters. You'd have to build a
correct category table.
--
__Pascal_Bourguignon__ _ Software patents are endangering
() ASCII ribbon against html email (o_ the computer industry all around
/\ 1962:DO20I=1.100 //\ the world http://lpf.ai.mit.edu/
2001:my($f)=`fortune`; V_/ http://petition.eurolinux.org/