From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#39190: 28.0.50; two buffers with same buffer-file-name (diff-syntax-fontify-props) Date: Wed, 19 Feb 2020 00:53:51 +0200 Organization: LINKOV.NET Message-ID: <87sgj78q2o.fsf@mail.linkov.net> References: <875zh73dg8.fsf@betli.tmit.bme.hu> <8736c921s6.fsf@mail.linkov.net> <875zh13e5d.fsf@mail.linkov.net> <87h80iqafm.fsf@betli.tmit.bme.hu> <87ftg0fnyb.fsf@mail.linkov.net> <87d0b3qz3m.fsf@betli.tmit.bme.hu> <871rrhkgkm.fsf@mail.linkov.net> <87v9os914e.fsf@betli.tmit.bme.hu> <87a764y35u.fsf@mail.linkov.net> <87r1zd8gvx.fsf@betli.tmit.bme.hu> <87imknqogu.fsf@mail.linkov.net> <87lfpi548j.fsf@mail.linkov.net> <87a75wek14.fsf@mail.linkov.net> <87sgjj7njt.fsf@betli.tmit.bme.hu> <87o8twep2f.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="11367"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 39190@debbugs.gnu.org, Felician Nemeth To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 18 23:57:22 2020 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 1j4Bnt-0002mN-8j for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Feb 2020 23:57:21 +0100 Original-Received: from localhost ([::1]:42998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4Bns-0004mV-9f for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 18 Feb 2020 17:57:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39628) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4Bnd-0004fy-Tg for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2020 17:57:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4Bna-0005uA-Or for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2020 17:57:05 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35471) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j4Bna-0005t6-GQ for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2020 17:57:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j4Bna-0007Eu-Ds for bug-gnu-emacs@gnu.org; Tue, 18 Feb 2020 17:57:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Feb 2020 22:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39190 X-GNU-PR-Package: emacs Original-Received: via spool by 39190-submit@debbugs.gnu.org id=B39190.158206659027787 (code B ref 39190); Tue, 18 Feb 2020 22:57:02 +0000 Original-Received: (at 39190) by debbugs.gnu.org; 18 Feb 2020 22:56:30 +0000 Original-Received: from localhost ([127.0.0.1]:41444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4Bn3-0007E7-MS for submit@debbugs.gnu.org; Tue, 18 Feb 2020 17:56:29 -0500 Original-Received: from beige.elm.relay.mailchannels.net ([23.83.212.16]:45801) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j4Bn1-0007Dy-EY for 39190@debbugs.gnu.org; Tue, 18 Feb 2020 17:56:27 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 35F36217F2; Tue, 18 Feb 2020 22:56:26 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a86.g.dreamhost.com (100-96-217-5.trex.outbound.svc.cluster.local [100.96.217.5]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B725521507; Tue, 18 Feb 2020 22:56:25 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a86.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Tue, 18 Feb 2020 22:56:26 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Belong-Cellar: 0aa7f08c137ba586_1582066585972_3439453576 X-MC-Loop-Signature: 1582066585972:3603370356 X-MC-Ingress-Time: 1582066585971 Original-Received: from pdx1-sub0-mail-a86.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a86.g.dreamhost.com (Postfix) with ESMTP id 45B9E7EF5F; Tue, 18 Feb 2020 14:56:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=linkov.net; bh=WN9KH/ fHT0ZFVbfC6/WeHAm/Bmk=; b=M3MCZ2hiahnxrHYC/WWsYZw/y6359/93Og1YVR jbyKpZ1ReKQ84mKByMDYO4Vk2M6IoUbA4Cc0OKDzD9Wa+1d0j3xvtApyMqP0KYVA jp30poco5FP56w5kjhHKFB+tQyjLEghurXaMFn1kbT9hQUHhzHwvu15FRlPDbrL8 xOr/U= Original-Received: from localhost.linkov.net (m91-129-103-27.cust.tele2.ee [91.129.103.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a86.g.dreamhost.com (Postfix) with ESMTPSA id C5F147EF5D; Tue, 18 Feb 2020 14:56:21 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a86 In-Reply-To: (Stefan Monnier's message of "Tue, 18 Feb 2020 08:33:48 -0500") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrjeelgddtudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtgfesthekredttderjeenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdefrddvjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehlohgtrghlhhhoshhtrdhlihhnkhhovhdrnhgvthdpihhnvghtpeeluddruddvledruddtfedrvdejpdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepmhhonhhnihgvrhesihhrohdruhhmohhnthhrvggrlhdrtggr X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:176226 Archived-At: >> (defun conf-mode () >> ... >> ;; `conf-mode' plays two roles: it's the parent of several sub-modes >> ;; but it's also the function that chooses between those submodes. >> ;; To tell the difference between those two cases where the function >> ;; might be called, we check `delay-mode-hooks'. >> ;; (adopted from tex-mode.el) >> (if (not delay-mode-hooks) >> ;; try to guess sub-mode of conf-mode based on buffer content > > The Right Thing=E2=84=A2 to do is of course to split `conf-mode` into t= wo > functions, one for the generic entry point and the other for the shared > parent mode. Maybe a simpler variant would be to use some other variable to distinguis= h sub-mode and its parent, instead of relying on delay-mode-hooks?