From 918a5eae179f7998e4872cc5cf2f301a21c36587 Mon Sep 17 00:00:00 2001 From: k3tu0isui Date: Sun, 10 Jan 2021 14:36:51 +0100 Subject: [PATCH] Make font locking work in mercury-mode * lisp/progmodes/prolog.el (prolog-font-lock-keywords): Work in all modes derived from prolog-mode (bug#45747). (mercury-mode): Set up variables based on the Prolog system (bug#45747). Copyright-paperwork-exempt: yes --- lisp/progmodes/prolog.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index c8f6c12a3f0..9f5f9ed6d3d 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -1201,7 +1201,9 @@ Commands: (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) + ;; Run once more to set up based on `prolog-system' + (prolog-mode-variables)) ;;------------------------------------------------------------------- @@ -2082,7 +2084,7 @@ Argument BOUND is a buffer position limiting searching." (delq nil (cond - ((eq major-mode 'prolog-mode) + ((derived-mode-p 'prolog-mode) (list head-predicates head-predicates-1 -- 2.39.5