emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 305dbc7 2/4: Move description of value to syntax-ppss functio


From: Dmitry Gutov
Subject: Re: master 305dbc7 2/4: Move description of value to syntax-ppss function.
Date: Wed, 30 Oct 2019 17:26:19 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 30.10.2019 17:22, Lars Ingebrigtsen wrote:

Yes, the doc string certainly implies that they can be relied upon if
you use that function instead.

On the other hand, perhaps I shouldn't have moved it --
parse-partial-sexp is used a lot, too.  I was only seeing syntax-ppss
everywhere, but I see that it's used less than 2x as much.

syntax-ppss is indeed the function that most consumers should call, but it's low-level enough that I never considered that to be a problem.

So perhaps that patch should be reverted anyway.

That's what I would do.

Or have the list in
both functions.  Or, even better, stop saying

(if (nth 5 state)
     (do-something-incomprehensible)
   (do-something-else-incomprehensible))

everywhere and just add accessor functions already, so that the code
becomes marginally more readable.  Because trying to make sense of it
now is just too hard, and it doesn't have to be.

Someone should probably try to add that accessor thing, but also perf-test the result.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]