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

[jasspa] Some more questions about Highlighting.

Expand Messages
  • fourje
    Thanks to Jon Green, I m slowly getting a handle on all of the document functions. however, I am getting a little confused. I m reading the help file, and I m
    Message 1 of 2 , Feb 18, 2000
    • 0 Attachment
      Thanks to Jon Green, I'm slowly getting a handle on all of the document
      functions. however, I am getting a little confused. I'm reading the help
      file, and I'm looking in 'hkdoc.emf' trying to understand all of the
      highlighting facilities. This is made all the more difficult by my lack of
      understanding about regular expressions (the documentation seem to be
      sparse on this subject also).

      It seems to me that hkdoc.emf suggests some things that are just not
      happening. Below I have copied a few lines from the hkdoc.emf I have.
      These some comment lines:

      ; 1.1 Title - Whole line hilighted in yellow
      ; a) Text - Bullets are hilighted.
      This does not happen.
      ; * Text - Bullets are hilighted.
      ; "Text" - Quoted text is hilighted.

      ;; A) 1)
      ;; All lines commencing with [a-zA-Z]) or [0-9]) are assumed to be
      ;; minor sections. The section number is hilighted. e.g:
      This does not happen.
      ;; 'xx' "yy"
      ;; All text in single or double quotes is hilighted, assumed to be
      ;; literal text. e.g.
      The first part does not happen

      These are some of the highlighting instructions I found:

      0 hilight .hilight.doc 0 $global-scheme
      Not sure what this does.

      hilight .hilight.doc 0x20 "*" .scheme.no1
      The documentation states that 0x20 means "first non-white character on
      line" Ok - * does get highlighted.

      hilight .hilight.doc 0x21 "\w)" .scheme.no1
      I don't know what 0x21 means. I think that "\w" means any word constituent
      character. If this is the case then I expect [A-Za-z0-9]) to be
      highlighted. Unfortunately only w) gets highlighted.

      hilight .hilight.doc 0 "^\\s *\\[\\w*\\]" .scheme.no1
      I'm lost here.

      hilight .hilight.doc 0x22 "[[:digit:]]\\." .scheme.header
      I don't know what 0x22 means, but [0-9]. does get hightlighted.

      hilight .hilight.doc 0x22 "[[:alpha:]]\\.[[:digit:]]" .scheme.header
      So does [A-za-z].[0-9].

      hilight .hilight.doc 0x804 "\"" "\"" "\\" .scheme.string
      I'm lost. I think it's defining the double-quote highlighting, but I don't
      know how it works - also not sure on 0x804 - I think it means that the
      starting and ending quotes don't have to be on the same line. I think the
      first string identifies the start of highlighting, the second string the
      end of highlighting but I don't know what the third string is for.

      hilight .hilight.doc 0x804 "`" "'" "" .scheme.no1
      Same here for the single quote highlighting - however this works only if I
      use the (I don't know what its called - the character under the tilde on
      the US keyboard).

      hilight .hilight.doc 0 "'.'" .scheme.quote
      Got no idea here.

      hilight .hilight.doc 0 "'\\\\.'" .scheme.quote
      or here.

      hilight .hilight.doc 0x22 "Appendix" .scheme.header
      The Appendix gets highlighted as a header.

      hilight .hilight.doc 0x22 "_" .scheme.header
      so does this

      hilight .hilight.doc 0x22 ">" .scheme.comment
      this gets highlighted in red.

      hilight .hilight.doc 0x80 "^@" .hilight.doc1 .scheme.no2
      Highlighted in green if @ is first character on line -
      ; @ block
      0 hilight .hilight.doc1 0 .scheme.no2
      I'm assuming that this has something to do with highlighting an indented
      block of text following the previous @.

      hilight .hilight.doc1 0x80 "^[ \t]*\n" .hilight.doc $global-scheme
      No idea.

      hilight .hilight.doc1 0x80 "^\n" .hilight.doc $global-scheme
      No idea.


      What I'm hoping for is some construction direction from the list.
      I think that by clarifying my understanding in this will help me understand other tinks in jasspa.
      Thanks in advance.
      Dave E.
    • fourje
      In answer to some of my own questions - (I was NOT going to give up until I understood more - and enlightenment came at 3am). ... ... ...
      Message 2 of 2 , Feb 19, 2000
      • 0 Attachment
        In answer to some of my own questions - (I was "NOT" going to give up
        until I understood more - and enlightenment came at 3am).

        fourje wrote:
        >
        <SNIP>
        >
        > It seems to me that hkdoc.emf suggests some things that are just not
        > happening. Below I have copied a few lines from the hkdoc.emf I have.
        > These some comment lines:
        >
        <SNIP>
        > ; a) Text - Bullets are hilighted.
        > This does not happen.
        <SNIP>
        >
        > ;; A) 1)
        > ;; All lines commencing with [a-zA-Z]) or [0-9]) are assumed to be
        > ;; minor sections. The section number is hilighted. e.g:
        > This does not happen.
        <SNIP>
        > hilight .hilight.doc 0x21 "\w)" .scheme.no1
        Got this small portion working - The solution only highlights my lack of
        experience in this area.
        my text file contained this statement:
        > -!- document; sectioned; pseudo-code -!-

        Which is acceptable, however all of the highlighting statements I was
        trying to understand were in the area of "hkdoc.emf" labeled
        'sectioned'.
        It seems if you mix the two in the header, then the highlighting
        statements for pseudo-code are the ones used.
        So, a review of my hkdoc.emf file and some tweaks to the pseudo-code
        section seems to be on the cards for today<g>. Maybe I'll understand
        some of the other stuff I can't decipher.
        <SNIP>
        Dave E.
      Your message has been successfully submitted and would be delivered to recipients shortly.