Subject: Re: bug#74415: 29.4; mouse-start-end does not respect syntax-table text properties

From: Eli Zaretskii <[email-masked]>
Date: Sat, 04 Jan 2025 12:54:21 +0200

> From: Stefan Monnier <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked]
> Date: Fri, 13 Dec 2024 12:05:55 -0500
> 
> > No, it was not dead code before, but changing the outer condition
> > makes it impossible for both the outer condition and the inner
> > condition to be true at the same time.
> > The current code is the following (inside a cond)
> >
> > ((and (= mode 1)
> >       (= start end)
> >       (char-after start)
> >       (= (char-syntax (char-after start)) ?\())
> >  (if (/= (syntax-class (syntax-after start)) 4) ; raw syntax code for ?\(
> >      ;; This happens in CC Mode when unbalanced parens in CPP
> >      ;; constructs are given punctuation syntax with
> >      ;; syntax-table text properties.  (2016-02-21).
> >      (signal 'scan-error (list "Containing expression ends prematurely"
> >                                start start))
> >    (list start
> >          (save-excursion
> >            (goto-char start)
> >            (forward-sexp 1)
> >            (point)))))
> 
> I have the strong impression that this reflects the fact that the
> if+signal was a workaround which we're now replacing with an actual fix.

Evidently.  So I've now installed my changes on the master branch,
after removing the unneeded code which signals an error, and I'm
therefore closing this bug.