unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#14394: jit-lock-force-redisplay redefinition breaks jit fontification in auctex
@ 2013-05-13  9:23 Antoine Levitt
  2013-05-13 16:11 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Antoine Levitt @ 2013-05-13  9:23 UTC (permalink / raw)
  To: 14394, bug-auctex, monnier

Hi,

A commit of Stefan Monnier in April 23 changed the API of
jit-lock-force-redisplay. First and easiest, the docstring of
jit-lock-force-redisplay was not changed, and still mentions the old BUF
argument.

Second, this breaks function font-latex-jit-lock-force-redisplay in
auctex, which uses the old prototype. This is present in emacs and
auctex from trunk. Is the prototype change really necessary? If no, this
is a bug for emacs, if yes, this is a bug for auctex. In doubt, I'm
submitting the report in both.





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

* bug#14394: jit-lock-force-redisplay redefinition breaks jit fontification in auctex
  2013-05-13  9:23 bug#14394: jit-lock-force-redisplay redefinition breaks jit fontification in auctex Antoine Levitt
@ 2013-05-13 16:11 ` Eli Zaretskii
  2013-05-13 16:57   ` bug#14394: [Bug-AUCTeX] " Ralf Angeli
  2013-05-14 15:52 ` Stefan Monnier
  2014-02-10 21:44 ` bug#14394: " Glenn Morris
  2 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2013-05-13 16:11 UTC (permalink / raw)
  To: Antoine Levitt; +Cc: bug-auctex, 14394

> From: Antoine Levitt <antoine.levitt@gmail.com>
> Date: Mon, 13 May 2013 11:23:07 +0200
> 
> A commit of Stefan Monnier in April 23 changed the API of
> jit-lock-force-redisplay. First and easiest, the docstring of
> jit-lock-force-redisplay was not changed, and still mentions the old BUF
> argument.
> 
> Second, this breaks function font-latex-jit-lock-force-redisplay in
> auctex, which uses the old prototype. This is present in emacs and
> auctex from trunk.

The doc string fix issue aside, is there any reason why AUCTeX should
call jit-lock-force-redisplay, instead of always using its expanded
code, like it does for versions of Emacs that don't have that
function?

I mean, doesn't this incident speak volumes about the danger of using
internal APIs?





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

* bug#14394: [Bug-AUCTeX] bug#14394: jit-lock-force-redisplay redefinition breaks jit fontification in auctex
  2013-05-13 16:11 ` Eli Zaretskii
@ 2013-05-13 16:57   ` Ralf Angeli
  0 siblings, 0 replies; 5+ messages in thread
From: Ralf Angeli @ 2013-05-13 16:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: bug-auctex, 14394, Antoine Levitt

* Eli Zaretskii (2013-05-13) writes:

>> Second, this breaks function font-latex-jit-lock-force-redisplay in
>> auctex, which uses the old prototype. This is present in emacs and
>> auctex from trunk.
>
> The doc string fix issue aside, is there any reason why AUCTeX should
> call jit-lock-force-redisplay, instead of always using its expanded
> code, like it does for versions of Emacs that don't have that
> function?

I guess the idea was that calling the function might be more
forward-compatible than using the expanded code because this decouples
the code from future changes in the underlying machinery.  In this
particular case this didn't work so well, but things can break with
either approach.

Mosè already changed the code in AUCTeX's repository to use the expanded
code only, so we might stick with this for the time being and see what
happens.

-- 
Ralf





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

* Re: jit-lock-force-redisplay redefinition breaks jit fontification in auctex
  2013-05-13  9:23 bug#14394: jit-lock-force-redisplay redefinition breaks jit fontification in auctex Antoine Levitt
  2013-05-13 16:11 ` Eli Zaretskii
@ 2013-05-14 15:52 ` Stefan Monnier
  2014-02-10 21:44 ` bug#14394: " Glenn Morris
  2 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2013-05-14 15:52 UTC (permalink / raw)
  To: Antoine Levitt; +Cc: bug-auctex, bug-gnu-emacs

> Second, this breaks function font-latex-jit-lock-force-redisplay in
> auctex, which uses the old prototype. This is present in emacs and
> auctex from trunk. Is the prototype change really necessary? If no, this
> is a bug for emacs, if yes, this is a bug for auctex. In doubt, I'm
> submitting the report in both.

The answer is that font-latex should not modify
font-lock-fontify-region-function and should instead use
font-lock-extend-region-functions (it's OK to do what it does when
running on older Emacsen which do not have
font-lock-extend-region-functions, of course).


        Stefan


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

* bug#14394: jit-lock-force-redisplay redefinition breaks jit fontification in auctex
  2013-05-13  9:23 bug#14394: jit-lock-force-redisplay redefinition breaks jit fontification in auctex Antoine Levitt
  2013-05-13 16:11 ` Eli Zaretskii
  2013-05-14 15:52 ` Stefan Monnier
@ 2014-02-10 21:44 ` Glenn Morris
  2 siblings, 0 replies; 5+ messages in thread
From: Glenn Morris @ 2014-02-10 21:44 UTC (permalink / raw)
  To: 14394-done

Version: 24.4

Antoine Levitt wrote:

> First and easiest, the docstring of jit-lock-force-redisplay was not
> changed, and still mentions the old BUF argument.

Fixed.

The remainder is an AUCTeX issue, and since you said you already mailed
them about it, no need to keep this Emacs bug report open.





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

end of thread, other threads:[~2014-02-10 21:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-13  9:23 bug#14394: jit-lock-force-redisplay redefinition breaks jit fontification in auctex Antoine Levitt
2013-05-13 16:11 ` Eli Zaretskii
2013-05-13 16:57   ` bug#14394: [Bug-AUCTeX] " Ralf Angeli
2013-05-14 15:52 ` Stefan Monnier
2014-02-10 21:44 ` bug#14394: " Glenn Morris

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).