unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* need to recognize non-ASCII identifiers
@ 2003-04-02 17:05 Dave Love
  2003-04-02 23:15 ` Martin Stjernholm
  0 siblings, 1 reply; 7+ messages in thread
From: Dave Love @ 2003-04-02 17:05 UTC (permalink / raw)
  Cc: bug-gnu-emacs

cc-mode needs to recognize non-ASCII identifiers.  I guess this should
be done for all languages, since Java is defined to use Unicode and
you can use non-ASCII charsets in C.

This will only work cleanly in Emacs 21, which should use replacements
in regexp char classes like `[:alnum:]' instead of `a-zA-Z0-9' and
similar in the relevant places.  (It should be safe to make the
replacement generally.)  To make it work also with XEmacs, you can
test for the relevant features with something like

`(string-match "[[:alpha:]]" "x")'

and conditionalize on the result at compile time.

I tried to make suitable changes but then failed to build the result
properly because of the way it's compiled, which I don't understand;
I've commented on that before...  I guess it's easy to start from
scratch on the replacements.


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: need to recognize non-ASCII identifiers
  2003-04-02 17:05 Dave Love
@ 2003-04-02 23:15 ` Martin Stjernholm
  2003-04-03 16:31   ` Dave Love
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Stjernholm @ 2003-04-02 23:15 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Dave Love <d.love@dl.ac.uk> wrote:

> cc-mode needs to recognize non-ASCII identifiers.  I guess this should
> be done for all languages, since Java is defined to use Unicode and
> you can use non-ASCII charsets in C.

Yes, furthermore it would hardly be a problem if CC Mode is more
lenient in this regard than the compiler.

> This will only work cleanly in Emacs 21, which should use replacements
> in regexp char classes like `[:alnum:]' instead of `a-zA-Z0-9' and
> similar in the relevant places.

Even in other versions there's the possibility to use \sw etc. The
problem has been that there's no character class that matches all
alphabetic characters but not the digits. However, you mentioned
[:alpha:] which would presumably do just that.

You said it works in Emacs 21, but I haven't been able to find any doc
on these new character classes in the manual for Emacs 21.2. Where can
I read about it?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: need to recognize non-ASCII identifiers
@ 2003-04-03  0:50 Luc Teirlinck
  2003-04-03 11:22 ` Martin Stjernholm
  0 siblings, 1 reply; 7+ messages in thread
From: Luc Teirlinck @ 2003-04-03  0:50 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Martin Stjernholm wrote:

    You said it works in Emacs 21, but I haven't been able to find any
    doc
    on these new character classes in the manual for Emacs 21.2. Where
    can
    I read about it?

Start Emacs.  Do C- h i g (elisp)Char Classes

Is this the information you want?

(In my original message, I forgot to CC to bug-gnu-emacs@gnu.org.
I only resend so that you would not accidentally reply to my original
message, mistakenly believing that the reply would get posted.)

Sincerely,

Luc.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: need to recognize non-ASCII identifiers
  2003-04-03  0:50 need to recognize non-ASCII identifiers Luc Teirlinck
@ 2003-04-03 11:22 ` Martin Stjernholm
  2003-04-04  6:58   ` Richard Stallman
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Stjernholm @ 2003-04-03 11:22 UTC (permalink / raw)
  Cc: bug-gnu-emacs, bug-cc-mode

Luc Teirlinck <teirllm@dms.auburn.edu> wrote:

> Martin Stjernholm wrote:
>
>     You said it works in Emacs 21, but I haven't been able to find
>     any doc on these new character classes in the manual for Emacs
>     21.2. Where can I read about it?
>
> Start Emacs.  Do C- h i g (elisp)Char Classes
>
> Is this the information you want?

It is, thank you. My error was to look at the section about regexps in
the normal Emacs manual, which doesn't mention it. I suggest that it's
synched up with the elisp manual.


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: need to recognize non-ASCII identifiers
  2003-04-02 23:15 ` Martin Stjernholm
@ 2003-04-03 16:31   ` Dave Love
  0 siblings, 0 replies; 7+ messages in thread
From: Dave Love @ 2003-04-03 16:31 UTC (permalink / raw)
  Cc: bug-gnu-emacs

Martin Stjernholm <mast@lysator.liu.se> writes:

> Even in other versions there's the possibility to use \sw etc.

Yes, but that's even less useful for non-ASCII text, which is why we
needed the POSIX char classes.

> The problem has been that there's no character class that matches
> all alphabetic characters but not the digits. However, you mentioned
> [:alpha:] which would presumably do just that.

Yes.

> You said it works in Emacs 21, but I haven't been able to find any doc
> on these new character classes in the manual for Emacs 21.2. Where can
> I read about it?

Info node `Char Classes' or regex(7).

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: need to recognize non-ASCII identifiers
  2003-04-03 11:22 ` Martin Stjernholm
@ 2003-04-04  6:58   ` Richard Stallman
  2003-04-08 22:38     ` Martin Stjernholm
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Stallman @ 2003-04-04  6:58 UTC (permalink / raw)
  Cc: teirllm, bug-gnu-emacs, bug-cc-mode

    It is, thank you. My error was to look at the section about regexps in
    the normal Emacs manual, which doesn't mention it. I suggest that it's
    synched up with the elisp manual.

We are trying to avoid making the Emacs manual bigger, so it is
probably better if we don't do that.  This feature is mainly useful
for programmers.



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: need to recognize non-ASCII identifiers
  2003-04-04  6:58   ` Richard Stallman
@ 2003-04-08 22:38     ` Martin Stjernholm
  0 siblings, 0 replies; 7+ messages in thread
From: Martin Stjernholm @ 2003-04-08 22:38 UTC (permalink / raw)
  Cc: teirllm

Richard Stallman <rms@gnu.org> wrote:

>     It is, thank you. My error was to look at the section about regexps in
>     the normal Emacs manual, which doesn't mention it. I suggest that it's
>     synched up with the elisp manual.
>
> We are trying to avoid making the Emacs manual bigger, so it is
> probably better if we don't do that.  This feature is mainly useful
> for programmers.

I think it could be of some use otherwise too. Anyway, the section in
the Emacs manual gives the impression that there's nothing more to it,
which is misleading. It ought to mention that it's incomplete, at least.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-04-08 22:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-03  0:50 need to recognize non-ASCII identifiers Luc Teirlinck
2003-04-03 11:22 ` Martin Stjernholm
2003-04-04  6:58   ` Richard Stallman
2003-04-08 22:38     ` Martin Stjernholm
  -- strict thread matches above, loose matches on Subject: below --
2003-04-02 17:05 Dave Love
2003-04-02 23:15 ` Martin Stjernholm
2003-04-03 16:31   ` Dave Love

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).