From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Reza Nikoopour Newsgroups: gmane.emacs.devel Subject: Re: Help Understanding syntax-propertize-function Date: Tue, 16 Mar 2021 08:37:55 -0700 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000106a7f05bda92711" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21498"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 16 16:40:48 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 1lMBoO-0005T2-EV for ged-emacs-devel@m.gmane-mx.org; Tue, 16 Mar 2021 16:40:48 +0100 Original-Received: from localhost ([::1]:55096 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMBoN-00014t-FR for ged-emacs-devel@m.gmane-mx.org; Tue, 16 Mar 2021 11:40:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58390) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMBlp-0007i0-1o for emacs-devel@gnu.org; Tue, 16 Mar 2021 11:38:09 -0400 Original-Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]:35078) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMBln-0003qN-DH for emacs-devel@gnu.org; Tue, 16 Mar 2021 11:38:08 -0400 Original-Received: by mail-io1-xd36.google.com with SMTP id g27so37654188iox.2 for ; Tue, 16 Mar 2021 08:38:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mnKXs/ndl94Zn5UXuuongpjGj3Nj8Jma+eX2dyBZKnM=; b=f7mxjbqs8HEcf+D+VFp/bHTuBLJyFM1nrCRoyyhDB8S/qQiVlOfJvzWu3acN4RKSkv ZLaBboxnTvjwe6e+JRGW+gSnZWMwrY/omOkeHZqTabVPfkK7tlkMlPUi3zezqp7zDquz PFtrLpy15b9CEWyHLNxoDCWRA7YUH/MUIJx52Zj2cwMlhEvvyEbkIhzaD5TXFXzhhZNd Zi2OoLJBDaUKneIUkzhiDF5GsLXwfQsnoPGp32Uq80UtJ5WHUvvwNRQr8IMIzCPqj/ug ABKaZh5n6IusUQAgOPwXlcM2VkjT8vQC3PZS/y7yL3FGr5jxfROyUNCpYLDHXriwdjkf 7H7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mnKXs/ndl94Zn5UXuuongpjGj3Nj8Jma+eX2dyBZKnM=; b=tYPQY6UMlNwO4i2SH2HYcWB+81LMKL+bh/St7Lvglkj9F9TK6sCiWbFeu6Ppg+GC0D AOfMJMRH3C0jyEnwJsYTgZmhrVghvBWW1oCiK1q1LBfwCudwICRxsx090rIGFdEuMXvT SxgsPqmnp8dmfYuyUbCVTxf1MQMnmFOld4lrMMwsC5XcGBmjcdvmZH9Gf1nSrD2QVAg8 wduIaDxm9ZNnPg+O+SiT9Eetw4xHE85wLthTXoqsm831UafzOsOATs3SjtAPrEkW4nEK 0d5vrH3aJ9xLCnTxRoDzwszjdoHAFBInG5vOHAyigmwENY7fsqAAcqReMcw+w6Jypljo QUMw== X-Gm-Message-State: AOAM531XTk3Uz8qirvZuLEscJoBoAt1+UwkeLlJY77XFrmLPYmlNJw6V eHtl+QdYGWug8N1KMApBYTv/5iKQTqFM1UKvDEiPgFmjmaY= X-Google-Smtp-Source: ABdhPJw7h2ZSAd1UyZlNysAjKqvZmyDWhRNPsZGIZ8SJYsJCjlFC0PvzAahzD7aPRp9yVnFqBlslQ3KL4FUyNoYeAOM= X-Received: by 2002:a05:6602:3144:: with SMTP id m4mr3824128ioy.103.1615909086062; Tue, 16 Mar 2021 08:38:06 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::d36; envelope-from=rnikoopour@gmail.com; helo=mail-io1-xd36.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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:266498 Archived-At: --000000000000106a7f05bda92711 Content-Type: text/plain; charset="UTF-8" Thank you so much for that explanation. It helped a lot. > It's been placed on the opening char > at position (nth 8 ppss) by the same code that placed the `|` syntax > property on that same character. I'm a bit confused as to what places the `|` syntax property. I see `(put-text-property eol (1+ eol) 'hcl-here-doc-marker str)` in `hcl--font-lock-open-heredoc`. But my understanding is that syntactic phase happens before the fontification. So I don't understand how `hcl--font-lock-open-heredoc` is able to place the symbol for `hcl--syntax-propertize-function`. Reza --000000000000106a7f05bda92711 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you so much for that explanation.=C2=A0 It helped a = lot.

> It's been placed on the opening char
> at positi= on (nth 8 ppss) by the same code that placed the `|` syntax
> propert= y on that same character.

I'm a bit confused as to w= hat places the `|` syntax property.=C2=A0 I see
`(put-text-property eol = (1+ eol) 'hcl-here-doc-marker str)` in=C2=A0
`hcl--font-lock-open-he= redoc`.=C2=A0 But my understanding is that syntactic
phase happen= s before the fontification.=C2=A0 So I don't understand how
`= hcl--font-lock-open-heredoc` is able to place the symbol for
`hcl= --syntax-propertize-function`.

Reza
--000000000000106a7f05bda92711--