Loading ...
Sorry, an error occurred while loading the content.

[jasspa] Re: How to define highlighting / buffer behaviour

Expand Messages
  • Alex Worden
    Yeah, I figured most of this stuff out with some perseverance. Thanks! Alex ... From: Detlef Groth To: Sent: Wednesday,
    Message 1 of 5 , Feb 16, 2000
    • 0 Attachment
      Yeah, I figured most of this stuff out with some perseverance. Thanks!

      Alex

      ----- Original Message -----
      From: Detlef Groth <dgroth@...>
      To: <jasspa@...>
      Sent: Wednesday, February 16, 2000 6:53 AM
      Subject: [jasspa] Re: How to define highlighting / buffer behaviour


      > Hello,
      >
      > to answer your question an example to hilight C-Code inside HTMl-code:
      >
      > ;; C-specific stuff inside <pre> environment of HTML-pages
      > set-variable .hilight.htmlC &pinc .hilight.next 1 ; declaring the
      > hilighting
      > 0 hilight .hilight.htmlC 2 50 $global-scheme
      > hilight .hilight.html 0xc0 "<pre>C" "<pre>" .hilight.htmlC
      > $global-scheme
      > ; means if '<pre>C' is writen C-hilighing starts
      >
      > hilight .hilight.htmlC 0xc0 "</pre>" "</pre>" .hilight.html
      > $global-scheme
      > ; if '</pre>' is written normal HTML-hiligthing starts again
      > ;; some examples for c-specific hilighing
      > hilight .hilight.htmlC 64 "main()" "main()" .scheme.bold
      > ; keywords
      > hilight .hilight.htmlC 1 "break" .scheme.keyword
      > hilight .hilight.htmlC 1 "case" .scheme.keyword
      > hilight .hilight.htmlC 1 "continue" .scheme.keyword
      > hilight .hilight.htmlC 1 "default" .scheme.keyword
      > hilight .hilight.htmlC 1 "do" .scheme.keyword
      > ; etc.
      >
      > Is it not great ?
      > Regards, Detlef
      > "alex worden" <alexworde-@...> wrote:
      > original article:http://www.egroups.com/group/jasspa/?start=196
      >
      > > Hi Jon,
      > >
      > > I did find some good docs on buffer hilighting eventually. I did a
      > > help-command on 'hilight' and was pleasantly surprised that the docs
      > have
      > > improved greatly. I'll let you know if I have any other more
      > intelligent
      > > questions when I've worked through the documentation some more.
      > >
      > > I suppose one useful resource would be a top-level index that is more
      > > obvious. Language Templates is quite cryptic - I was looking for
      > something
      > > like
      > > Help->Customizing MicroEmacs->Buffer Hilighting
      > >
      > > When I get a spare minute, I'm going to try something adventurous -
      > > hilighting for JSP, which is a mixture of HTML and Java in the same
      > buffer.
      > > I saw something on switching buffer-hilight modes in the docs. If you
      > have
      > > any examples of this that would be useful.
      > >
      > > Thanks again,
      > >
      > > Alex
      > >
      > <snip>
      >
      >
      >
      > ------------------------------------------------------------------------
      > __________________________________________________________________________
      >
      > This is an unmoderated list. JASSPA is not responsible for the content of
      > any material posted to this list.
      >
      >
      > ------------------------------------------------------------------------
      > *** Got Questions? Get Answers. Got Answers? Get Paid. ***
      > Sign up at Infomarco.com and you can win $30,000 cash or a trip to China.
      > http://click.egroups.com/1/1251/4/_/6009/_/950712888/
      >
      > -- Create a poll/survey for your group!
      > -- http://www.egroups.com/vote?listname=jasspa&m=1
      >
      >
      >
    • Detlef Groth
      Hello, recently I observed an even better possibility to have one hilight-scheme inside an other. Observe the following: define-macro
      Message 2 of 5 , Mar 8 3:48 AM
      • 0 Attachment
        Hello,

        recently I observed an even better possibility to have one
        hilight-scheme inside an other.

        Observe the following:
        define-macro hilight-javascript-inside-html
        ; this macro has to be inside myhtml.emf
        execute-file "hkjava"
        0 hilight .hilight.java 2 50 $global-scheme
        hilight .hilight.html 0xc0 "<Script language=\"JavaScript\">"
        "<Script language=\"JavaScript\">" .hilight.java $global-scheme
        hilight .hilight.java 0xc0 "</Script>" "</Script>" .hilight.html
        $global-scheme
        screen-update
        !emacro
        define-macro hilight-latex-inside-html ; macro in myhtml.emf
        ; using the <pre> tags for input of code
        execute-file "hklatex"
        0 hilight .hilight.latex 2 50 $global-scheme
        hilight .hilight.html 0xc0 "<pre>" "<pre>" .hilight.latex
        $global-scheme
        execute-file "hklatex"
        hilight .hilight.latex 0xc0 "</pre>" "</pre>" .hilight.html
        $global-scheme
        screen-update
        !emacro
        define-macro hilight-html-inside-latex ; macro in mylatex.emf
        ; using the \verbatim-environment for input of code
        execute-file "hkhtml"
        0 hilight .hilight.html 2 50 $global-scheme
        hilight .hilight.latex 0xc0 "\\begin{verbatim}" "\\begin{verbatim}"
        .hilight.html $global-scheme
        execute-file "hklatex"
        hilight .hilight.html 0xc0 "\\end{verbatim}" "\\end{verbatim}"
        .hilight.latex $global-scheme
        screen-update
        !emacro

        So you can have latex-hilighting inside html, html-hiligthing inside
        latex, cpp inside html, emf inside Email and so on ....

        Best regards,

        Detlef

        "detlef groth" <dgroth@...> wrote:
        original article:http://www.egroups.com/group/jasspa/?start=200
        > Hello,
        >
        > to answer your question an example to hilight C-Code inside HTMl-code:
        >
        > ;; C-specific stuff inside <pre> environment of HTML-pages
        > set-variable .hilight.htmlC &pinc .hilight.next 1 ; declaring the
        > hilighting
        > 0 hilight .hilight.htmlC 2 50 $global-scheme
        > hilight .hilight.html 0xc0 "<pre>C" "<pre>" .hilight.htmlC
        > $global-scheme
        > ; means if '<pre>C' is writen C-hilighing starts
        >
        > hilight .hilight.htmlC 0xc0 "</pre>" "</pre>" .hilight.html
        > $global-scheme
        > ; if '</pre>' is written normal HTML-hiligthing starts again
        > ;; some examples for c-specific hilighing
        > hilight .hilight.htmlC 64 "main()" "main()" .scheme.bold
        > ; keywords
        > hilight .hilight.htmlC 1 "break" .scheme.keyword
        > hilight .hilight.htmlC 1 "case" .scheme.keyword
        > hilight .hilight.htmlC 1 "continue" .scheme.keyword
        > hilight .hilight.htmlC 1 "default" .scheme.keyword
        > hilight .hilight.htmlC 1 "do" .scheme.keyword
        > ; etc.
        >
        > Is it not great ?
        > Regards, Detlef
        > "alex worden" <alexworde-@...> wrote:
        > original article:http://www.egroups.com/group/jasspa/?start=196
        >
        > > Hi Jon,
        > >
        > > I did find some good docs on buffer hilighting eventually. I did a
        > > help-command on 'hilight' and was pleasantly surprised that the docs
        > have
        > > improved greatly. I'll let you know if I have any other more
        > intelligent
        > > questions when I've worked through the documentation some more.
        > >
        > > I suppose one useful resource would be a top-level index that is
        more
        > > obvious. Language Templates is quite cryptic - I was looking for
        > something
        > > like
        > > Help->Customizing MicroEmacs->Buffer Hilighting
        > >
        > > When I get a spare minute, I'm going to try something adventurous -
        > > hilighting for JSP, which is a mixture of HTML and Java in the same
        > buffer.
        > > I saw something on switching buffer-hilight modes in the docs. If
        you
        > have
        > > any examples of this that would be useful.
        > >
        > > Thanks again,
        > >
        > > Alex
        > >
        > <snip>
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.