unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#46274: 28.0.50; Inconsistent doc for syntax-propertize-function
@ 2021-02-03 20:04 Filipp Gunbin
  2021-02-04  8:34 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 6+ messages in thread
From: Filipp Gunbin @ 2021-02-03 20:04 UTC (permalink / raw)
  To: 46274

C-h v syntax-propertize-function contains this text:

--8<---------------cut here---------------start------------->8---
The specified function may call `syntax-ppss' on any position
before END, but if it calls `syntax-ppss' on some
position and later modifies the buffer on some earlier position,
then it is its responsibility to call `syntax-ppss-flush-cache' to flush
the now obsolete ppss info from the cache.
--8<---------------cut here---------------end--------------->8---

But (info "(elisp) Syntax Properties") has a different view:

--8<---------------cut here---------------start------------->8---
It is allowed to call ‘syntax-ppss’ on any position before END.
However, it should not call ‘syntax-ppss-flush-cache’; so, it is not
allowed to call ‘syntax-ppss’ on some position and later modify the
buffer at an earlier position.
--8<---------------cut here---------------end--------------->8---

Which is the right one?

Thanks.

In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin20.2.0, NS appkit-2022.20 Version 11.1 (Build 20C69))
 of 2021-02-03 built on fgunbin.local
Repository revision: 20e48b6fd6cade60e468140a66127d326abfb8ff
Repository branch: master
System Description:  macOS 11.1





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#46274: 28.0.50; Inconsistent doc for syntax-propertize-function
  2021-02-03 20:04 bug#46274: 28.0.50; Inconsistent doc for syntax-propertize-function Filipp Gunbin
@ 2021-02-04  8:34 ` Lars Ingebrigtsen
  2021-02-04 16:23   ` Stefan Monnier
  2021-02-04 20:34   ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-04  8:34 UTC (permalink / raw)
  To: 46274; +Cc: Stefan Monnier

Filipp Gunbin <fgunbin@fastmail.fm> writes:

> C-h v syntax-propertize-function contains this text:
>
> The specified function may call `syntax-ppss' on any position
> before END, but if it calls `syntax-ppss' on some
> position and later modifies the buffer on some earlier position,
> then it is its responsibility to call `syntax-ppss-flush-cache' to flush
> the now obsolete ppss info from the cache.
>
> But (info "(elisp) Syntax Properties") has a different view:
>
> It is allowed to call ‘syntax-ppss’ on any position before END.
> However, it should not call ‘syntax-ppss-flush-cache’; so, it is not
> allowed to call ‘syntax-ppss’ on some position and later modify the
> buffer at an earlier position.
>
> Which is the right one?

Good question.  Stefan M added to the CCs.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#46274: 28.0.50; Inconsistent doc for syntax-propertize-function
  2021-02-04  8:34 ` Lars Ingebrigtsen
@ 2021-02-04 16:23   ` Stefan Monnier
  2021-02-05  8:38     ` Lars Ingebrigtsen
  2021-02-04 20:34   ` Stefan Monnier
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2021-02-04 16:23 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 46274

>> C-h v syntax-propertize-function contains this text:
>>
>> The specified function may call `syntax-ppss' on any position
>> before END, but if it calls `syntax-ppss' on some
>> position and later modifies the buffer on some earlier position,
>> then it is its responsibility to call `syntax-ppss-flush-cache' to flush
>> the now obsolete ppss info from the cache.
>>
>> But (info "(elisp) Syntax Properties") has a different view:
>>
>> It is allowed to call ‘syntax-ppss’ on any position before END.
>> However, it should not call ‘syntax-ppss-flush-cache’; so, it is not
>> allowed to call ‘syntax-ppss’ on some position and later modify the
>> buffer at an earlier position.
>>
>> Which is the right one?
>
> Good question.  Stefan M added to the CCs.

Great question.  Thanks for asking.


        Stefan






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#46274: 28.0.50; Inconsistent doc for syntax-propertize-function
  2021-02-04  8:34 ` Lars Ingebrigtsen
  2021-02-04 16:23   ` Stefan Monnier
@ 2021-02-04 20:34   ` Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Stefan Monnier @ 2021-02-04 20:34 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 46274

>> C-h v syntax-propertize-function contains this text:
>>
>> The specified function may call `syntax-ppss' on any position
>> before END, but if it calls `syntax-ppss' on some
>> position and later modifies the buffer on some earlier position,
>> then it is its responsibility to call `syntax-ppss-flush-cache' to flush
>> the now obsolete ppss info from the cache.
>>
>> But (info "(elisp) Syntax Properties") has a different view:
>>
>> It is allowed to call ‘syntax-ppss’ on any position before END.
>> However, it should not call ‘syntax-ppss-flush-cache’; so, it is not
>> allowed to call ‘syntax-ppss’ on some position and later modify the
>> buffer at an earlier position.
>>
>> Which is the right one?
>
> Good question.  Stefan M added to the CCs.

I think the docstring is the one that's more right (especially since
there is a fair number of syntax-propertize-functions which do call
‘syntax-ppss-flush-cache’).


        Stefan






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#46274: 28.0.50; Inconsistent doc for syntax-propertize-function
  2021-02-04 16:23   ` Stefan Monnier
@ 2021-02-05  8:38     ` Lars Ingebrigtsen
  2021-02-05 14:59       ` Filipp Gunbin
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Ingebrigtsen @ 2021-02-05  8:38 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 46274

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Good question.  Stefan M added to the CCs.
>
> Great question.  Thanks for asking.

You're welcome, I'm sure.

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> I think the docstring is the one that's more right (especially since
> there is a fair number of syntax-propertize-functions which do call
> ‘syntax-ppss-flush-cache’).

OK, I've now updated the manual in Emacs 28 (by just copying the bit
from the doc string and tweaking it slightly).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#46274: 28.0.50; Inconsistent doc for syntax-propertize-function
  2021-02-05  8:38     ` Lars Ingebrigtsen
@ 2021-02-05 14:59       ` Filipp Gunbin
  0 siblings, 0 replies; 6+ messages in thread
From: Filipp Gunbin @ 2021-02-05 14:59 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 46274, Stefan Monnier

Thank you both!

Filipp





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-05 14:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-03 20:04 bug#46274: 28.0.50; Inconsistent doc for syntax-propertize-function Filipp Gunbin
2021-02-04  8:34 ` Lars Ingebrigtsen
2021-02-04 16:23   ` Stefan Monnier
2021-02-05  8:38     ` Lars Ingebrigtsen
2021-02-05 14:59       ` Filipp Gunbin
2021-02-04 20:34   ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).