From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: k3tu0isui@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#45747: 27.1; mercury-mode font lock bug Date: Sun, 10 Jan 2021 18:58:24 +0530 Message-ID: <20210110132824.h5m5mglfx23hrch7@sildranDT.localdomain> References: <20210109132243.zrd4ojp24ps4desd@sildranDT.localdomain> <20210109152949.6tpygnvvbyj4jtlx@sildranDT.localdomain> <87bldxuf9c.fsf_-_@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36026"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45747@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 10 14:32:06 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kyapC-0009Fq-5t for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Jan 2021 14:32:06 +0100 Original-Received: from localhost ([::1]:43194 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kyapB-0004uK-8M for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Jan 2021 08:32:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyamE-0003P2-E5 for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2021 08:29:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41902) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kyamE-0006hN-7E for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2021 08:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kyamE-0000ld-3r for bug-gnu-emacs@gnu.org; Sun, 10 Jan 2021 08:29:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: k3tu0isui@gmail.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Jan 2021 13:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 45747-submit@debbugs.gnu.org id=B45747.16102853192898 (code B ref 45747); Sun, 10 Jan 2021 13:29:02 +0000 Original-Received: (at 45747) by debbugs.gnu.org; 10 Jan 2021 13:28:39 +0000 Original-Received: from localhost ([127.0.0.1]:53448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyalq-0000kg-W8 for submit@debbugs.gnu.org; Sun, 10 Jan 2021 08:28:39 -0500 Original-Received: from mail-pj1-f45.google.com ([209.85.216.45]:50497) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyalp-0000kQ-M3 for 45747@debbugs.gnu.org; Sun, 10 Jan 2021 08:28:38 -0500 Original-Received: by mail-pj1-f45.google.com with SMTP id lj6so6178056pjb.0 for <45747@debbugs.gnu.org>; Sun, 10 Jan 2021 05:28:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=NUho3rmFbIp5M6pq7fnRnsooMPLsjM0A+dX8sjTXRjc=; b=X3cmjNRGC9kgqh/YDe5P7Htgn5tEUJ7icQ6xKuttfHxptNn9eOWb0mjxGZkVs45S2X O5YnBU9EV2g48JGkpWYAfxf0qqTGBN4KnjNXX52Nl/xj4CfRLQRE1B2xl82zW3rTU1kA KlR64YoRu4Tn6S+DCoNr6eQda7vHOPSu91LTmhkN8ecDwsk/9vS5FpG3ktVGhAj+vYlt 2Kq23Rv/ZgX65ZPCC3ebl1DlDNeDaYW/Tma0eKQ/Hl7SI4TIKNgJV+6Hn670ddLqB9ke VGaEEwN5YGIRdHUfUm1NbiJV4zeoOMqIKQO+QY1tno20zxRIBU8pIoKjfwKxKe53cDhP D85g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=NUho3rmFbIp5M6pq7fnRnsooMPLsjM0A+dX8sjTXRjc=; b=AYalN1TdiJh+q4FbGHA612H5pWCc69Hh5Gp2HhK7jfIEAKUJ30lL8ac7/5lflE/glM 7J42iAVAN7c43dTuag85km6y2vS39Jg9K/IeID8OJ69hx7p9ymmSO7Iuuu6QuqW0ADvZ AS3AFbU8l5VspQzcI8h7QkaBzdytR8asvui21ssOa3x9yRAWrpp7h+3+7jZpyb+naUCf goHqKbuf6yPZsjOhi8VZRRx10NuKFEQkYdf8gZf0DDNzduVaDKrWEKSL8x4SnqMy01vf dW2wIqtXHXXNqnkGnec//v0bDKNcrA9i4QCUNLlc2b4ZKO/gLa/KxWwSUIpvjPjGw5rD AQMw== X-Gm-Message-State: AOAM531AiatfxEJamQfHXHwTCwfMioSwg7uQWoaQmmwDYUOxy5O1JHLy dVoSA9csiDVnGaQdvKe7Ip0= X-Google-Smtp-Source: ABdhPJz9CoVcLWAlxDI3uvnexbk3ssTToQBySqJn1tzmSA0M0CFPTHxFeYiGt+ZtIA6bwFYovlbsaw== X-Received: by 2002:a17:90a:be0a:: with SMTP id a10mr13362061pjs.139.1610285311878; Sun, 10 Jan 2021 05:28:31 -0800 (PST) Original-Received: from sildranDT.localdomain ([27.59.147.45]) by smtp.gmail.com with ESMTPSA id t4sm7676528pfe.212.2021.01.10.05.28.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Jan 2021 05:28:31 -0800 (PST) Content-Disposition: inline In-Reply-To: <87bldxuf9c.fsf_-_@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:197603 Archived-At: 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.