0

I cannot get colors to work in mercury-mode. Mercury is supported under prolog-mode and in the source of prolog-mode there is quite a bit of it defined(eg. see below).

        ;; Mercury specific patterns
        (types
         (if (eq prolog-system 'mercury)
             (list
              (regexp-opt prolog-types-i 'words)
              0 'font-lock-type-face)))
        (modes
         (if (eq prolog-system 'mercury)
             (list
              (regexp-opt prolog-mode-specificators-i 'words)
              0 'font-lock-constant-face)))
        (directives
         (if (eq prolog-system 'mercury)
             (list
              (regexp-opt prolog-directives-i 'words)
              0 'prolog-warning-face)))

When I try using it, only face other than the default is the font-lock-comment-face. I am not familiar with writing or debugging emacs modes. How should I approach debugging this problem? If any one is using mercury-mode and got it working with colors please tell me how.

2
  • Does M-x list-faces-display list the faces you need? If not, maybe check file prolog.el, to see whether/where/how they're defined.
    – Drew
    Commented Nov 15, 2020 at 18:47
  • Yes all the required faces are in list-faces-display when the prolog-mode is first loaded.
    – rajashekar
    Commented Nov 16, 2020 at 3:25

1 Answer 1

0

Found the bug and fixed it here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.