Subject: mailing-list for TeXmacs Users
List archive
Re: [TeXmacs] Re: literate programming, again. Question about syntax highlighting.
Chronological Thread
From : bytecolor <address@hidden>- To: address@hidden
- Subject: Re: [TeXmacs] Re: literate programming, again. Question about syntax highlighting.
- Date: Sun, 13 Sep 2009 23:03:57 -0700 (PDT)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=d6SF9/hGM1zipYDzOnbjndOLV+4WEO3IZBe+8x+MfOMWQk8wn/vZbJo5ED1QA5Bkcnz6j1QEomK5Koaawo/AQLP7Eh7aEiOdO3GJu1Wv1cSbsXyuVdal3nM3TmROMV+kVAt7XFLte7DTWywzjDY85M42YrHAsUp/LVth1awOGLQ=;
It's a start you may want to expand upon. noweb.ts should be a package
instead of a style. \noweb-chunk may be more appropriate. It should probably
use \code instead \cpp-fragment. Maybe give \noweb-chunk another parameter to
specify language. Lots of possibilities. Especially if you start adding to
TeXmacs at the Scheme level. ;)
I read somewere in the docs about indenting. Still foggy on the details. One
option would be to adapt the Emacs model. C-j calls (newline-and-indent)
which can call a mode's indent procedure. The indent procedure just looks
around where the cursor is and determines what the indent should be at that
point. There is more to it than that but it's doable.
--
bytecolor (S. Edward Dolan)
--- On Sun, 9/13/09, Michael Lachmann <address@hidden> wrote:
> From: Michael Lachmann <address@hidden>
> Subject: Re: [TeXmacs] Re: literate programming, again. Question about
> syntax highlighting.
> To: address@hidden
> Date: Sunday, September 13, 2009, 8:02 AM
> Thank you very much, bytecolor
> (Edward)!
>
> This works great!
> I edited cpp_language.cpp to add some D keywords.
>
> Just a small comment:
> The way noweb works is that you can have several
> <<>>= definitions
> with the same name, and they are just concatenated in
> order. I guess
> it is a "feature", though it helps when you break up code
> into parts.
> This seems to work correctly in noweb.ts: when you click on
> the <<>>
> label, it goes to the first reference of the definition. I
> don't know
> if this breaks anything otherwise. I guess one could define
> a
> noweb-fragment, and a noweb-fragment-part, if it matters.
>
> Michael
>
>
> if anyone is interested, here are the keywords I added to
> cpp_color_setup_keywords... there are some more though...
> ///// D
> t("unittest")=c ;
> t("import")=c ;
> t("assert")=c ;
> t("alias")=c ;
> t("const")=c ;
> t("cast")=c ;
> t("foreach")=c ;
> t("long")=c ;
> t("int")=c ;
> t("bool")=c ;
> t("real")=c ;
> t("char")=c ;
> t("ref")=c ;
> t("auto")=c ;
- Re: [TeXmacs] Re: literate programming, again. Question about syntax highlighting., bytecolor, 09/13/2009
- Re: [TeXmacs] Re: literate programming, again. Question about syntax highlighting., Michael Lachmann, 09/13/2009
- Re: [TeXmacs] Re: literate programming, again. Question about syntax highlighting., Michael Lachmann, 09/14/2009
- Re: [TeXmacs] Re: literate programming, again. Question about syntax highlighting., Alvaro Tejero Cantero, 09/14/2009
- Re: [TeXmacs] Re: literate programming, again. Question about syntax highlighting., bytecolor, 09/14/2009
- Re: [TeXmacs] Re: literate programming, again. Question about syntax highlighting., Michael Lachmann, 09/15/2009
- Re: [TeXmacs] Re: literate programming, again. Question about syntax highlighting., Joris van der Hoeven, 09/24/2009
- Re: [TeXmacs] Re: literate programming, again. Question about syntax highlighting., Michael Lachmann, 09/14/2009
- Re: [TeXmacs] Re: literate programming, again. Question about syntax highlighting., Michael Lachmann, 09/13/2009
Archive powered by MHonArc 2.6.19.