Skip to main content
added 5 characters in body; edited tags
Source Link
Drew
  • 79.1k
  • 10
  • 123
  • 257

I'm trying to build a major mode for xwiki, where I'm defining

{{{
verbatim
}}}

as a comment.

So far, I've done

(eval-when-compile
  (defconst xwiki-syntax-propertize-rules
    (syntax-propertize-precompile-rules
     ("{{{" (0 "< b"))
     ("}}}" (0 "> b")))))

 (setq-local syntax-propertize-function (syntax-propertize-rules xwiki-syntax-propertize-rules))
    (eval-when-compile
      (defconst xwiki-syntax-propertize-rules
        (syntax-propertize-precompile-rules
         ("{{{" (0 "< b"))
         ("}}}" (0 "> b")))))

     (setq-local syntax-propertize-function (syntax-propertize-rules xwiki-syntax-propertize-rules))

When I do describe-char, on any of the characters in {{{, I see that it is identified as a comment style b. I also see }}} identified as comment style b.

However, under text properties, there's nothing set for faceface. Am I missing something?

I'm trying to build a major mode for xwiki, where I'm defining

{{{
verbatim
}}}

as a comment.

So far, I've done

(eval-when-compile
  (defconst xwiki-syntax-propertize-rules
    (syntax-propertize-precompile-rules
     ("{{{" (0 "< b"))
     ("}}}" (0 "> b")))))

 (setq-local syntax-propertize-function (syntax-propertize-rules xwiki-syntax-propertize-rules))

When I do describe-char, on any of the characters in {{{, I see that it is identified as a comment style b. I also see }}} identified as comment style b.

However, under text properties, there's nothing set for face. Am I missing something?

I'm trying to build a major mode for xwiki, where I'm defining

{{{
verbatim
}}}

as a comment.

So far, I've done

    (eval-when-compile
      (defconst xwiki-syntax-propertize-rules
        (syntax-propertize-precompile-rules
         ("{{{" (0 "< b"))
         ("}}}" (0 "> b")))))

     (setq-local syntax-propertize-function (syntax-propertize-rules xwiki-syntax-propertize-rules))

When I do describe-char, on any of the characters in {{{, I see that it is identified as a comment style b. I also see }}} identified as comment style b.

However, under text properties, there's nothing set for face. Am I missing something?

Source Link

After setting syntax-propertize-function, comment is not being fontified with comment face

I'm trying to build a major mode for xwiki, where I'm defining

{{{
verbatim
}}}

as a comment.

So far, I've done

(eval-when-compile
  (defconst xwiki-syntax-propertize-rules
    (syntax-propertize-precompile-rules
     ("{{{" (0 "< b"))
     ("}}}" (0 "> b")))))

 (setq-local syntax-propertize-function (syntax-propertize-rules xwiki-syntax-propertize-rules))

When I do describe-char, on any of the characters in {{{, I see that it is identified as a comment style b. I also see }}} identified as comment style b.

However, under text properties, there's nothing set for face. Am I missing something?