From: k3tu0isui@gmail.com
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 45747@debbugs.gnu.org
Subject: bug#45747: 27.1; mercury-mode font lock bug
Date: Sun, 10 Jan 2021 18:58:24 +0530 [thread overview]
Message-ID: <20210110132824.h5m5mglfx23hrch7@sildranDT.localdomain> (raw)
In-Reply-To: <87bldxuf9c.fsf_-_@gnus.org>
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.
next prev parent reply other threads:[~2021-01-10 13:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-09 13:22 bug#45747: 27.1; mercury-mode font lock bug k3tu0isui
2021-01-09 15:29 ` bug#45747: [PATCH] mercury-mode font lock fix k3tu0isui
2021-01-10 12:51 ` bug#45747: 27.1; mercury-mode font lock bug Lars Ingebrigtsen
2021-01-10 13:28 ` k3tu0isui [this message]
2021-01-10 13:38 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210110132824.h5m5mglfx23hrch7@sildranDT.localdomain \
--to=k3tu0isui@gmail.com \
--cc=45747@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.