GNU bug report logs - #55798
font-lock-fontify-syntactically-region uses point without initializing it.

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Sat, 4 Jun 2022 19:18:02 UTC

Severity: normal

Tags: notabug

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 55798 <at> debbugs.gnu.org
Subject: bug#55798: font-lock-fontify-syntactically-region uses point without initializing it.
Date: Sun, 5 Jun 2022 18:46:04 +0000
Hello, Lars.

On Sun, Jun 05, 2022 at 16:23:35 +0200, Lars Ingebrigtsen wrote:
> Alan Mackenzie <acm <at> muc.de> writes:

> > * emacs/lisp/font-lock.el (font-lock-fontify-syntactically-region): At
> > line 26 of this function, appears:

> >     (setq state (parse-partial-sexp (point) end nil nil state
> >                                     'syntax-table))

> > ..  However, there is no goto-char or other way of setting point earlier
> > in the function (except in one arm of an `if' form).  Neither is point
> > defined to have a defined setting at the entry to the function.

> (syntax-ppss start) (called earlier) will skip to start, won't it?

Er, yes, it will.  Somehow I didn't know that syntax-ppss did that.
Sorry for the false bug report.  I'll close it as notabug (assuming you
haven't done this already.)

> -- 
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 3 years and 45 days ago.

Previous Next


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