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

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

Re: Need help with some changes in c-mode


From: Glenn Morris
Subject: Re: Need help with some changes in c-mode
Date: Mon, 19 Feb 2007 11:34:19 -0800
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

nemshilov@gmail.com wrote:

> I'm trying to create a custom mode based on the c-mode and there are
> a pair of questions which I cannot figure out by myself.
>
> First, I need to be able to use strings like that
>
> var_a = <<<EOL
> some string inside of it
> EOL;
>
> I with to have all the text between "<<<EOL\n" and "\nEOL;" to be
> marked as a string.
[...]
> The second stuff, I wish to have strings like "#....\n" as single-line
> comments.

>From the information presented, it sounds like you might be better off
basing your mode on sh-mode. Have at look at how sh-script.el handles
here documents (which is what your first construct is, save for an
extra "<"). Look for "heredocs" in the code.


reply via email to

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