From: Vitalie Spinu <spinuvit@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 24749@debbugs.gnu.org
Subject: bug#24749: Making sure syntax-propertize is called
Date: Mon, 03 Jun 2019 21:25:06 +0200 [thread overview]
Message-ID: <87sgsqwjxp.fsf@gmail.com> (raw)
In-Reply-To: <jwvzhmyv9xm.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 03 Jun 2019 13:47:29 -0400")
>> On Mon, Jun 03 2019 13:47, Stefan Monnier wrote:
> Indeed, font-lock is the most common caller of syntax-propertize, so
> that explains why interactive use typically is not affected.
It's a bit tricky actually. AFAICS font-lock installs it only when
font-lock-syntactic-keywords are defined and syntax-propertize-function is not
defined. The latter condition was undefined for me. So I still have no clear
idea what actually is setting the value. Likely some third party.
I pulled quite some hair till I figured how things work. So I wonder if a few
words documenting the parity between `syntax-propertize` and
`parse-sexp-lookup-properties` could be added to (preferably)
`syntax-propertize` docstring. Currently the only "doc" is a comment in
`run-mode-hooks`, which is the last place someone will look for it.
╭──────── #1982 ─ /home/vspinu/bin/emacs/lisp/subr.el ──
│ ;; `syntax-propertize' sets `parse-sexp-lookup-properties' for us, but
│ ;; in order for the sexp primitives to automatically call
│ ;; `syntax-propertize' we need `parse-sexp-lookup-properties' to be
│ ;; set first.
╰──────── #1985 ─
> Note: you can also set parse-sexp-lookup-properties's default value to
> t and forget about the problem ;-)
Why not make it the default then?
There is a clear redundancy between the two. If a mode defines
`syntax-propertize` then it must set `parse-sexp-lookup-properties`, and the
other way around.
It seems that the only(?) use case for a nil `parse-sexp-lookup-properties` is
to set it to nil dynamically in specialized lookup code for performance
reasons. Such code does let-bind it to nil already.
Vitalie
next prev parent reply other threads:[~2019-06-03 19:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-20 21:14 bug#24749: Making sure syntax-propertize is called Stefan Monnier
2016-10-20 22:31 ` Dmitry Gutov
2016-10-20 23:12 ` Stefan Monnier
2016-10-21 15:58 ` Dmitry Gutov
2016-10-21 6:56 ` Eli Zaretskii
2016-10-21 15:36 ` Stefan Monnier
2016-10-21 16:02 ` Eli Zaretskii
2016-10-21 16:34 ` Stefan Monnier
2016-10-21 17:27 ` Eli Zaretskii
2017-12-12 2:03 ` Noam Postavsky
2017-12-12 14:12 ` Stefan Monnier
[not found] ` <handler.24749.D24749.151308794732170.notifdone@debbugs.gnu.org>
2017-12-12 17:54 ` bug#24749: closed (Re: bug#24749: Making sure syntax-propertize is called) Tassilo Horn
2017-12-12 19:45 ` Stefan Monnier
[not found] ` <jwv4lovu3xj.fsf-monnier+emacs@gnu.org>
2017-12-13 8:50 ` martin rudalics
[not found] ` <87ef4awyb6.fsf@gmail.com>
[not found] ` <jwvblzewpgj.fsf-monnier+emacs@gnu.org>
2019-06-03 17:47 ` bug#24749: Making sure syntax-propertize is called Stefan Monnier
2019-06-03 19:25 ` Vitalie Spinu [this message]
2019-06-03 19:45 ` Stefan Monnier
2019-06-03 20:04 ` npostavs
2019-06-04 5:49 ` Vitalie Spinu
2019-06-04 13:08 ` Stefan Monnier
2019-06-05 5:25 ` Vitalie Spinu
2019-06-05 13:32 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sgsqwjxp.fsf@gmail.com \
--to=spinuvit@gmail.com \
--cc=24749@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.