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

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

Expand Messages
  • Alex Worden
    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
    Message 1 of 5 , Feb 15, 2000
    • 0 Attachment
      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

      P.S.

      What are you up to these days?

      ----- Original Message -----
      From: Jon Green <jnaught@...>
      To: <jasspa@...>
      Sent: Tuesday, February 15, 2000 2:02 AM
      Subject: [jasspa] Re: How to define highlighting / buffer behaviour


      > Alex,
      >
      > The buffer hilighting is explained in the following
      > locations:-
      >
      > Help->Language Templates (Bottom of help page)
      >
      > This page takes you through the process of setting up a template
      > including the indentation. (step by step).
      >
      > Help->File Hooks (Bottom of page)
      >
      > Describes additional information on the file hooks
      >
      > In addition there are the highight(2) and indent(2) pages.
      >
      > If these do not help then we are missing something in the
      > documentation - will need some pointers as to whats missing
      > or why it's difficult to understand.
      >
      > I usually use the hkc.emf and hkemf.emf for a good source
      > of template definition examples. Detlef's hkinfo.emf mailed
      > last month was a good example of character hiding (this is
      > also in the UNIX man pages and rendered HTML).
      >
      > Failing that mail some sample code with a brief description
      > of what you want and I'll put one together !!
      >
      > Regards
      > Jon.
      >
      >
      > Alex wrote:
      > >
      > > I've been using ME for a few years now but I'm sure I'm only just
      > > scraping the surface with what it can do. I'd love to figure out how to
      > > program it to do exactly what I want, but I just can't follow the style
      > > of documentation since I don't have the time or the patience. One
      > > feature in particular that has always eluded me is highlighting.
      > >
      > > Can someone please explain how I'd go about creating a new mode
      > > (fhook?) for highlighting and indentation etc. I can't find any useful
      > > documentation on this.
      > >
      > > It would be really useful if someone could just explain how on earth
      > > the cmode highlighting all works from start to finish, what all the
      > > macros actually do, and why they are there.
      > >
      > > Another approach would be to simply explain step-by-step how to set up
      > > a brand new scheme for highlighting.
      > >
      > > I'd be very grateful if one of you ME gurus could help, otherwise, I've
      > > just bought a book on GNU-emacs, and I'm about to go to 'the other
      > > side'...
      > >
      > > Thanks,
      > >
      > > Alex
      > >
      > > ------------------------------------------------------------------------
      > >
      __________________________________________________________________________
      > >
      > > This is an unmoderated list. JASSPA is not responsible for the content
      of
      > > any material posted to this list.
      > >
      > > ------------------------------------------------------------------------
      > > eLerts!
      > > Save cash today!
      > > http://click.egroups.com/1/1413/4/_/6009/_/950579020/
      > >
      > > -- Create a poll/survey for your group!
      > > -- http://www.egroups.com/vote?listname=jasspa&m=1
      >
      > ------------------------------------------------------------------------
      > __________________________________________________________________________
      >
      > This is an unmoderated list. JASSPA is not responsible for the content of
      > any material posted to this list.
      >
      >
      > ------------------------------------------------------------------------
      > eLerts!
      > Save cash today!
      > http://click.egroups.com/1/1413/4/_/6009/_/950610733/
      >
      > eGroups.com Home: http://www.egroups.com/group/jasspa/
      > http://www.egroups.com - Simplifying group communications
      >
      >
      >
    • Detlef Groth
      Hello, to answer your question an example to hilight C-Code inside HTMl-code: ;; C-specific stuff inside environment of HTML-pages set-variable
      Message 2 of 5 , Feb 16, 2000
      • 0 Attachment
        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>
      • Alex Worden
        Yeah, I figured most of this stuff out with some perseverance. Thanks! Alex ... From: Detlef Groth To: Sent: Wednesday,
        Message 3 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 4 of 5 , Mar 8, 2000
          • 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.