From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#74415: 29.4; mouse-start-end does not respect syntax-table text properties Date: Fri, 13 Dec 2024 12:05:55 -0500 Message-ID: References: <86cyilj6ks.fsf@gnu.org> <86mshjcpod.fsf@gnu.org> <86seqzisg2.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6820"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 74415@debbugs.gnu.org To: Guillaume Brunerie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Dec 13 18:07:37 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tM98a-0001cm-UB for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 13 Dec 2024 18:07:37 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tM98H-0006RJ-SK; Fri, 13 Dec 2024 12:07:18 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tM984-0006Qa-MX for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2024 12:07:06 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tM984-0004M7-6l for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2024 12:07:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=JVVOBIYsTIeMePEQH362R1Xgg9tfM6YGRiJwI3OuovI=; b=KYurj3eBeXyKMtiHXUHoWZAsdLprtgsGyqf0217SmmT65KKNNRaKCU76VUw9MIiyqnr5dJJCiRxZ7cQqPlHvcX/SrVXecPlS+RLCw2F1pN5LknBBVihOm3DMWboRK/XCHEnbz4pmfks698Ig0YojqdED48r0r7YetvSVV9Ildmi10BL7zamb/CfnUqwuN1iqHP+yVcj6axDvgU5yWDeOM0sq1VLhVQb20swLxgloPiko4Fn50fBt7cbcq6q/nLLbOPYr8QKhVWBS5nWCvxPhLMPkXvqQsA3VNIjVkin/DwsdtcBqoJ42VUPSISzbDQsMeAu3yEcbB7x8qJwueEh5DQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tM981-0000kX-Tr for bug-gnu-emacs@gnu.org; Fri, 13 Dec 2024 12:07:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Dec 2024 17:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74415 X-GNU-PR-Package: emacs Original-Received: via spool by 74415-submit@debbugs.gnu.org id=B74415.17341095862833 (code B ref 74415); Fri, 13 Dec 2024 17:07:01 +0000 Original-Received: (at 74415) by debbugs.gnu.org; 13 Dec 2024 17:06:26 +0000 Original-Received: from localhost ([127.0.0.1]:43981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tM97S-0000ja-BA for submit@debbugs.gnu.org; Fri, 13 Dec 2024 12:06:26 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:64281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tM97P-0000jG-NV for 74415@debbugs.gnu.org; Fri, 13 Dec 2024 12:06:25 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 121A010004A; Fri, 13 Dec 2024 12:05:57 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1734109556; bh=klf4xFIFk9YOs5bBLv9gqf0ai2VTMknsych7/ifKETs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=XpBToSAGJ43yPeT/+h4jFELhoVnIZ6anQV4eMHBcQPz6CZcirNkDXYWq6tuudXY5y iDfbQsrqoRQugbXBAWL2ujIDWlrUetXN/zwzmoVI/ih2gX9yE7MtTvenNfa3zlUNxr LgINJtYZeh4l+jA3Ifzeam++kjMw8cRTanEuHpMocZO9w9DT5mSd8tu3WguUGJh9TQ vE5Hazpm0ASsEkmdZZ+SGsATF76RKoaI4K38jkHM19+8cI42N2Uj8bctUpusqkLCu9 ZH4JoTsDlYxtyrMm0HcQ9XfgW458uplsL6mHS1WBsST4AvNzxM8CfBwZHvX78Z9M0J NZ6I8bFfaLC/w== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 40D71100042; Fri, 13 Dec 2024 12:05:56 -0500 (EST) Original-Received: from alfajor (unknown [23.233.149.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 26FF21204B0; Fri, 13 Dec 2024 12:05:56 -0500 (EST) In-Reply-To: (Guillaume Brunerie's message of "Mon, 9 Dec 2024 20:21:49 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296986 Archived-At: > 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. Stefan