Skip to content

Add a missing parameter in advice on font-lock-fontify-keywords-region#344

Merged
erikmd merged 1 commit intomasterfrom
font-lock-fix
Mar 7, 2018
Merged

Add a missing parameter in advice on font-lock-fontify-keywords-region#344
erikmd merged 1 commit intomasterfrom
font-lock-fix

Conversation

@cpitclaudel
Copy link
Copy Markdown
Member

This breaks various other modes in recent Emacs, most noticeably git-region-history:

Error during redisplay: (jit-lock-function 1501) signaled (wrong-number-of-arguments #[(ad--addoit-function beg end loudly) "\306� \203 \0\307\310\311
!\312\313Q!!\203 \0\310\311
!\312\313Q!�
#\210� �
#\211�)\207" [ad-return-value proof-buffer-type proof-assistant-symbol beg end loudly nil fboundp intern symbol-name "-" "font-lock-fontify-syntactically-region" ad--addoit-function] 6] 3)

@erikmd
Copy link
Copy Markdown
Contributor

erikmd commented Mar 7, 2018

Hi @cpitclaudel, thanks for your PR for master!
Did you test your patch with async as well?

@erikmd
Copy link
Copy Markdown
Contributor

erikmd commented Mar 7, 2018

Otherwise I can first merge #238 in async (which significantly improves the behavior w.r.t. retracting), and afterwards we test your patch on the new async so obtained?

@erikmd
Copy link
Copy Markdown
Contributor

erikmd commented Mar 7, 2018

BTW could you precise which recent Emacs version you tested, and which mode contains the function git-region-history ?

@cpitclaudel
Copy link
Copy Markdown
Member Author

I tested the current master, but things have been broken for a while. The font-lock-fontify-keywords-region has taken the third argument since at least 1995, and our advice was just wrong.
I'm happy with any merge strategy (I don't expect this to conflict)

@erikmd
Copy link
Copy Markdown
Contributor

erikmd commented Mar 7, 2018

OK, so thanks for having spotted this longstanding bug!

Just for the record, could you give more details about git-region-history? is it related to Magit?

@cpitclaudel
Copy link
Copy Markdown
Member Author

Just for the record, could you give more details about git-region-history? is it related to Magit?

No, not at all :) It's called by vc-region-history as vc-git-region-history-mode, which is a function vanilla Emacs.

@erikmd
Copy link
Copy Markdown
Contributor

erikmd commented Mar 7, 2018

OK :) I regularly use Emacs' Git facilities (with commands having C-x v prefix in vanilla Emacs) but wasn't aware of M-x vc-region-history, thanks for the tip!

@erikmd
Copy link
Copy Markdown
Contributor

erikmd commented Mar 7, 2018

Successfully tested after merging locally this PR in latest pg: async. Will merge in both branches.

@erikmd erikmd added the pg: proof-shell + async Related to both master and (unmaintained) async branches label Mar 7, 2018
@erikmd erikmd merged commit 315b704 into master Mar 7, 2018
erikmd added a commit that referenced this pull request Mar 7, 2018
@erikmd erikmd deleted the font-lock-fix branch March 7, 2018 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind: fix pg: proof-shell + async Related to both master and (unmaintained) async branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants