GNU bug report logs - #36492
c-mode fails with errors during fontification

Previous Next

Packages: cc-mode, emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Wed, 3 Jul 2019 20:58:02 UTC

Severity: normal

Tags: fixed

Found in version 27.0.50

Fixed in versions 27.0.50, 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: Alan Mackenzie <acm <at> muc.de>, 36492 <at> debbugs.gnu.org
Subject: bug#36492: c-mode fails with errors during fontification
Date: Mon, 08 Jul 2019 17:58:50 -0400
Juri Linkov <juri <at> 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.





This bug report was last modified 5 years and 261 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.