From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.devel Subject: Re: Help Understanding syntax-propertize-function Date: Wed, 24 Mar 2021 23:29:21 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24668"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) Cc: emacs-devel@gnu.org, Reza Nikoopour To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 24 21:30:57 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lPA9Y-0006LF-Lg for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Mar 2021 21:30:56 +0100 Original-Received: from localhost ([::1]:54614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lPA9X-0006wH-L9 for ged-emacs-devel@m.gmane-mx.org; Wed, 24 Mar 2021 16:30:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPA8F-0005iz-8A for emacs-devel@gnu.org; Wed, 24 Mar 2021 16:29:35 -0400 Original-Received: from out3-smtp.messagingengine.com ([66.111.4.27]:53731) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lPA8D-0003M5-Hu for emacs-devel@gnu.org; Wed, 24 Mar 2021 16:29:34 -0400 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 4FE245C00C1; Wed, 24 Mar 2021 16:29:30 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 24 Mar 2021 16:29:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm2; bh=yzpExcJqmd7yHvEwe/bp3JaViu MnYtT3FGOzzmkaweg=; b=J4rKeDl/0JcK+a0AJCbnN/Z/CkM7/vmCidR9jb5sfb 6RkaObl25V3NWrrWU0lh6h93z2Mdcy5HW9QZ2UdE6iY8Q9Lt5ixwpa2g3znXJz84 qSkobevY3pghkVzJYH99tVCE/EYnSxnrCrfXpLG6/IxjB4TrCe9nsUVEqyiOuiv2 Q+DUWwzqMzlkr0VO8xO5SdXlp+Cla6xNOnonLm9H0i/sojPHm83HUfRkkvtbsea/ 256bGJvagKaAhRUqcgKSiA7ubXADWaV02aJYS1zgJXW4Y4JY4Ph+053IR4NRkO5A 3T9b+Ei+4KHJDnzzir6ipSTQKfic3nR0HsxiDBkGnpUg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=yzpExc Jqmd7yHvEwe/bp3JaViuMnYtT3FGOzzmkaweg=; b=wUN7OE7AC+kE0DYdxovCEW uRBI4uSRrZ/yVjawPYRLvdqGs3meU8umaGNsUmKupL4hejybEMm+Bu0i5Gb+2wi6 XAVEX4vt1usuXkweFbYQlR5SFovvv+TI/mw/3Yeqm/7K/+faOLq8+8084nVYWA18 cBVUPj5KeKnvXAyiwgwq5d6InrASuBowqYdfmNf2/rcXAqzIPLdL0AezVXV3TuqK VBZLVTC73JPr1C9alLMrtaB5KuklYc9cbaRQ3NQQ9ynxwUar7l5rSfjl5itFyzrl VhhDcd+irBo4hLzhz4KXv9JzzLI37ro53XiC2ECJJvYNgXManCps3XTFLhTqp6vg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudegkedgudefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffujghffgffkfggtgesthdtredttdertdenucfhrhhomhephfhilhhi phhpucfiuhhnsghinhcuoehfghhunhgsihhnsehfrghsthhmrghilhdrfhhmqeenucggtf frrghtthgvrhhnpedvveekffdvueevhfdutdejheekvdeufeevtedttdevuddugfeiffei veeivefhtdenucfkphepkeegrddvtdegrdduleefrddutdeinecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepfhhguhhnsghinhesfhgrshhtmhgr ihhlrdhfmh X-ME-Proxy: Original-Received: from fgunbin.local (unknown [84.204.193.106]) by mail.messagingengine.com (Postfix) with ESMTPA id 8166E1080057; Wed, 24 Mar 2021 16:29:29 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Mon, 15 Mar 2021 19:30:08 -0400") Mail-Followup-To: Stefan Monnier , Reza Nikoopour , emacs-devel@gnu.org Received-SPF: pass client-ip=66.111.4.27; envelope-from=fgunbin@fastmail.fm; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:266979 Archived-At: There's the prog1 form at the end of hcl--font-lock-open-heredoc: ... (prog1 (string-to-syntax "|") (goto-char (+ 2 start)))))) It looks like it's meant to be a special "(prog1 EXP . EXPS)" form for syntax-propertize-rules. But it's inside of a defun used as SYNTAX: ... (syntax-propertize-rules (hcl--here-doc-beg-re (2 (hcl--font-lock-open-heredoc (match-beginning 0) (match-string 1) (match-beginning 2)))) I wonder - how could that work? Does syntax-propertize-rules inspect the SYNTAX expression to check for suchlike forms? Filipp