[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#45747: 27.1; mercury-mode font lock bug
From: |
k3tu0isui |
Subject: |
bug#45747: 27.1; mercury-mode font lock bug |
Date: |
Sun, 10 Jan 2021 18:58:24 +0530 |
Maybe prolog-mode-variables has already been called, but maybe due to
(setq-local prolog-system 'mercury) not being set, some variables like
prolog-determinism-specifiers-i and prolog-types-i are not being set to mercury
values. So quite a bit of keywords are ignored when syntax-highlighting happens.
Without (prolog-mode-variables) the variables prolog-determinism-specifiers-i
and prolog-types-i are bound to nil and syntax-highlighting for mode and type
declarations fails. But when I added this call to define-derived-mode they are
bound to ("cc_multi" "cc_nondet" "det" "erroneous" "failure" "multi" "nondet"
"semidet") and ("char" "float" "int" "io__state" "string" "univ") resp. and it
works.
I do not really understand how everything works, but my patch is working
somehow. I am just fixing the symptoms, if anyone has a better understanding
please provide a patch.
I agree with replacing (eq major-mode 'prolog-mode) with (derived-mode-p
'prolog-mode) which covers all derived modes, rather than my current specific
case of mercury mode.