emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: words, symbols and syntax-tables


From: Stefan Monnier
Subject: Re: words, symbols and syntax-tables
Date: Fri, 13 Jul 2001 05:34:27 -0400

>     Why on earth is there such a thing as a "w" syntax-class ?
> 
> So that forward-word can distinguish word characters.

As I said in my posting, `forward-word' does not need to use the syntax-table.
It can use some other table (most likely a new table introduced just
for this purpose.  Along the same lines as the case-tables).

After all the syntax-tables should reflect the language's syntax but
no programming language has the notion of `word'.

> I see no reason to change the design of this.

I'm not sure it's worth changing, but if you look at the various tricks
used to regexp-match symbols (almost the only reason why
font-lock-syntax-table is ever used), you'll note that the current
situation is not ideal.

Also it seems that the notion of `word' is only ever used interactively
(for M-f, M-t, M-d and M-b basically); in most other cases (font-lock,
indentation, ...) what is needed is the notion of `symbol'.

Furthermore, people have asked for fancier `word's.  For example,
to distinguish words in MixedCaseIdentifiers.

> Is there a problem you are trying to solve?

Just trying to understand the reason for the current situation, so
as to better evolve the current design.



        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]