[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: defining new character names?
From: |
Matthias Koeppe |
Subject: |
Re: defining new character names? |
Date: |
Tue, 20 Aug 2002 10:20:05 +0200 |
User-agent: |
Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1.80 (sparc-sun-solaris2.7) |
"Lars J. Aas" <address@hidden> writes:
> I'd like to be able to do something like this:
>
> (define-character "paren-close" #\051) ; 051 is ")"
>
> and then later
>
> (string-index line #\paren-close)
>
> I can of course define a normal variable for this, but then
> it won't shine from the usage that it is a character in the
> way the above does.
Why not use the name `paren-close-character' then.
#\ is read-syntax for literal character constants. It is not a "type
annotation". (If you define constant numeric variables like `pi', the
name will not start with a digit either.)
> I've looked in libguile/chars.{c,h} and the guile docs, but
> didn't find any obvious way to do this. Is it possible?
> The reason i'd like to do this is that inserting #\) in the
> scheme file makes the vim "%" command unusable over those
> blocks (and it's not as easy on the eye either), and there was
> no alternate name for that char other than using the octal
> ascii value.
I think it's a bad idea to change the language only to make sure that
a simplistic editor implementation works with it. File a bug report
with vim instead; I'm sure it is easy to fix.
Regards,
--
Matthias Köppe -- http://www.math.uni-magdeburg.de/~mkoeppe
- defining new character names?, Lars J. Aas, 2002/08/19
- Re: defining new character names?, Marius Vollmer, 2002/08/19
- Re: defining new character names?, Keith Wright, 2002/08/20
- Re: defining new character names?, Keith Wright, 2002/08/21
- Re: defining new character names?, Lars J. Aas, 2002/08/21
- Re: defining new character names?, rm, 2002/08/21
- Re: defining new character names?, Matthias Koeppe, 2002/08/21
- Re: defining new character names?, Lars J. Aas, 2002/08/21
- Re: defining new character names?, rm, 2002/08/21
- Re: defining new character names?, Matthias Koeppe, 2002/08/27
Re: defining new character names?,
Matthias Koeppe <=