help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: write your own emacs mode


From: Jesper Harder
Subject: Re: write your own emacs mode
Date: Tue, 16 Dec 2003 13:37:50 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

Joerg Schuster <address@hidden> writes:

> Jesper Harder <address@hidden> writes:
>
>> You can either turn of syntactic fontification in your mode (this
>> will also inhibit font locking of comments) or modify the syntax
>> table of the mode.
>
> Does the meaning of the regexes (like in ;;1) depend on the
> syntax-table?

I don't think any of your _specific_ regexps depend on the syntax.

But in general regexps can depend on the syntax table since we have
backlash constructs such as \w which matches characters with
word-constituent syntax, or \b which matches the beginning or end of a
word.

> Why do the regexes ;;a and ;;b match parts of the same "word" (where
> word is any string that doesn't contain \s characters)? 

I'm not quite sure about what you intend to do.  But I'll recommend
the very handy tool `M-x re-builder' for crafting some suitable
regexps.

> According to C-h f define-generic-modeI, ;;2 is a FUNCTION-LIST
> argument. Why isn't it possible to write '((modify-syntax-entry ?/
> "w")) at this place?

(modify-syntax-entry ...) is a function call, not a function.  You
can use something like:

    '((lambda () (modify-syntax-entry ?\" "w")))


reply via email to

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