From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.help Subject: Scanning parenthesis in string/comment Date: Sun, 22 Jan 2023 09:15:49 -0800 Message-ID: <497B6D44-1C2D-4C45-9B6B-6719D49B4A69@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.3\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9927"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 22 18:16:42 2023 Return-path: Envelope-to: geh-help-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 1pJdxS-0002Sv-EG for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 22 Jan 2023 18:16:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJdx0-0007w6-R5; Sun, 22 Jan 2023 12:16:14 -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 1pJdwy-0007vf-Q1 for help-gnu-emacs@gnu.org; Sun, 22 Jan 2023 12:16:13 -0500 Original-Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pJdww-0007Ps-Qv for help-gnu-emacs@gnu.org; Sun, 22 Jan 2023 12:16:12 -0500 Original-Received: by mail-pl1-x62a.google.com with SMTP id g23so9339236plq.12 for ; Sun, 22 Jan 2023 09:16:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=Kq4dejHxG3ZYoZGtwSkEUpdR2X7sc91L+dKMgwzWokI=; b=b0EZow16oxFVOOpwumtqrg/fvE0cKZH9tTqiQbVzD76zKBX9hdq+cPcoBf/t0mR/Sh hdXRlvuWH2HLub9/u7nUBy25FCugRAschGu+CGd9tbQ7+ko+UwDkYjiFEQeL8MQXgkms PMMiq+KQsT0nhw+qTGR484OQ9mMlwJykJlkR0DFkTB7F5GtMRmFij5Qy/Rvc1Sv1eESG UVR+36+hazEJRLS4kx8zkB5HsxW4HnqREE99drgewae5mjKpkS3CGfN7tkM919E3QzT6 RZkawpxhhr++uB1GQGFbVvNcV6rx2Uq5IjxTV1/+mbF5HzNm2AvLZ2Ej+pQpYP9u8/EJ 65CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Kq4dejHxG3ZYoZGtwSkEUpdR2X7sc91L+dKMgwzWokI=; b=oMe/GlTK/MxTiCOIvRZmFJBTkHRTZW98UHuEigbRX+ywiyQ99O98RrErjw/pWjtdGC x7YnK040bfARgizOt7o+0seHlVV9K+Q6OWl/6NeNRiCtpilY4vLRRwAfXezU/JORJYOB 8sJDfXgAE/lIwHrmRj75N8NKmOID/9fLchEum/FPy2wuevq+1qUxfEPlXFDm8Tjp9F7k vKQnLajSXveuu9wrN7Mdp05T+IyLlOZlj0T9OXAuj8IZK6C1yIUbatJLUtvfLrGnFkTb eENR4uwEZrIPBQ70b7f+jmajODsr0QCfMhNgE3xQTJJwpdiOK2hJebyfNyrYSBntmZVR HpSw== X-Gm-Message-State: AFqh2krZUR/bQHE37Y+Vnep5fk5cXm30CX4WW2AbtSRcyAAfaBAXb1y1 e4PeP7fGesv33MTZ1vcuv+DF8Jsqubk= X-Google-Smtp-Source: AMrXdXu3j7qMLmhhyKYOoKjzUR37UuRKMM8/E8NE2zpLQVovIYvV+Vck9goRKXwB0Gs39AHYJssg0Q== X-Received: by 2002:a17:903:2c7:b0:189:f7c2:7245 with SMTP id s7-20020a17090302c700b00189f7c27245mr24807902plk.45.1674407762669; Sun, 22 Jan 2023 09:16:02 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id e21-20020a170902d39500b0019258bcf3ffsm148578pld.56.2023.01.22.09.16.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jan 2023 09:16:02 -0800 (PST) X-Mailer: Apple Mail (2.3731.300.101.1.3) Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=casouri@gmail.com; helo=mail-pl1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142501 Archived-At: I=E2=80=99m writing an expand-region-like function, which expands region = by logical entities, like word-at-point, list-at-point, etc. Say I have = this string "Filter out invalid regions in REGIONS regarding ORIG. ORIG is the current position. Each region is (BEG . END).=E2=80=9D And point is at the opening parenthesis, how do I detect this balanced = parenthesis pair and expand the region over it? syntax-pass and = forward-list only works with lists outside of strings and comments, = IIUC. Yuan=