[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36492: c-mode fails with errors during fontification
From: |
Noam Postavsky |
Subject: |
bug#36492: c-mode fails with errors during fontification |
Date: |
Mon, 08 Jul 2019 17:58:50 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) |
Juri Linkov <juri@linkov.net> writes:
>> Rather than ignore-errors, perhaps using with-demoted-errors would
>> still let the errors be noticed without too much inconvenience?
>
> I tried this change:
>
> (unless (eq major-mode 'fundamental-mode)
> - (font-lock-ensure))))
> + (with-demoted-errors (font-lock-ensure)))))
> (setq text (buffer-string))
> (when (eq mode 'diff-mode)
> (setq ovs (mapcar (lambda (ov) (list ov (overlay-start ov)
>
> But it pops up the same error backtrace buffer.
Right, if you have debug-on-error set, with-demoted-errors won't stop
the debugger. But you should be able to continue with 'c' as normal, or
if you don't have debug-on-error set, you only get a message.