From: k3tu0isui@gmail.com
To: 45747@debbugs.gnu.org
Subject: bug#45747: [PATCH] mercury-mode font lock fix
Date: Sat, 9 Jan 2021 20:59:49 +0530 [thread overview]
Message-ID: <20210109152949.6tpygnvvbyj4jtlx@sildranDT.localdomain> (raw)
In-Reply-To: <20210109132243.zrd4ojp24ps4desd@sildranDT.localdomain>
[-- Attachment #1: Type: text/plain, Size: 338 bytes --]
The problem seems to be arising due to mercury-mode being defined as a major-mode rather than a different system under prolog mode. I changed a line in prolog-font-lock-keywords to work with mercury-mode and added a call to prolog-mode-variables in define-derived-mode mercury-mode to setup the required variables for font lock keywords.
[-- Attachment #2: emacs-mercury.patch --]
[-- Type: text/plain, Size: 813 bytes --]
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index c8f6c12a3f..742274a479 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -1201,7 +1201,8 @@ mercury-mode-map
(define-derived-mode mercury-mode prolog-mode "Prolog[Mercury]"
"Major mode for editing Mercury programs.
Actually this is just customized `prolog-mode'."
- (setq-local prolog-system 'mercury))
+ (setq-local prolog-system 'mercury)
+ (prolog-mode-variables))
\f
;;-------------------------------------------------------------------
@@ -2082,7 +2083,8 @@ prolog-font-lock-keywords
(delq
nil
(cond
- ((eq major-mode 'prolog-mode)
+ ((or (eq major-mode 'prolog-mode)
+ (eq major-mode 'mercury-mode))
(list
head-predicates
head-predicates-1
next prev parent reply other threads:[~2021-01-09 15:29 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 ` k3tu0isui [this message]
2021-01-10 12:51 ` Lars Ingebrigtsen
2021-01-10 13:28 ` k3tu0isui
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210109152949.6tpygnvvbyj4jtlx@sildranDT.localdomain \
--to=k3tu0isui@gmail.com \
--cc=45747@debbugs.gnu.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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).