help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Ert batch-mode error


From: Noam Postavsky
Subject: Re: Ert batch-mode error
Date: Mon, 13 Apr 2020 10:50:52 -0400

On Mon, 6 Apr 2020 at 23:50, Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> But looking at yasnippet-tests.el, I'm not sure what's going on:
> the only case where font-lock seems to be relevant is
> `do-yas-org-native-tab-in-source-block` (and it already uses
> `font-lock-ensure` when available).  So (barring compatibility with
> Emacs<24 for which you still need the non-font-lock-ensure version),
> would the patch below still perform the tests correctly?

As far as I can tell, the problem actually seems to be 24.3 specific,
so yes, assuming you meant <=24 rather than <24. In 24.3, the
following triggers an error when run interactively, but there is no
error in --batch mode, or when using with-temp-buffer (this is a
reduction from yasnippet's example-for-issue-474 test). That was the
motivation for adding yas--with-font-locked-temp-buffer (and I just
threw it in for all cc-mode related tests, just in case).

    (setq debug-on-error t)
    (with-current-buffer (get-buffer-create "foo") ;with-temp-buffer
      (c-mode)
      (insert "#include <foo>\n")
      (narrow-to-region (point) (point))
      (insert "`\"TODO: \"`")
      (delete-region (point-min) (point-max))
      (insert "TODO: "))



reply via email to

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