Skip to content

Conversation

@phst
Copy link
Contributor

@phst phst commented Jan 7, 2021

If the Warnings buffer has auto-fill enabled and we're about to print the
warning, display-warning' would loop back here through newline' and
`self-insert-command', causing infinite recursion.

I haven't been able to reproduce this in a noninteractive unit test,
unfortunately, but the issue happens in interactive mode whenever
yas--original-auto-fill-function' is nil and auto-fill-mode' is enabled in
the Warnings buffer.

  • yasnippet.el (yas--auto-fill): Disable `auto-fill-mode' in the Warnings
    buffer as well.

If the *Warnings* buffer has auto-fill enabled and we're about to print the
warning, `display-warning' would loop back here through `newline' and
`self-insert-command', causing infinite recursion.

I haven't been able to reproduce this in a noninteractive unit test,
unfortunately, but the issue happens in interactive mode whenever
`yas--original-auto-fill-function' is nil and `auto-fill-mode' is enabled in
the *Warnings* buffer.

* yasnippet.el (yas--auto-fill): Disable `auto-fill-mode' in the *Warnings*
buffer as well.
@joaotavora
Copy link
Owner

Hi @phst , I'm running a little short on maintainership here. As such, I don't understand the problem. I did take a look at the patch and it looks kind of strange. Wouldn't a let binding solve the problem? Anyway, I don't have more info for you, sorry. @npostavs would be the person to ask.

@phst
Copy link
Contributor Author

phst commented Feb 28, 2021

Wouldn't a let binding solve the problem?

What kind of let binding would you suggest?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants