From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?K=C3=A9vin_Le_Gouguec?= Newsgroups: gmane.emacs.help Subject: Re: Debugging SMIE for sh-script.el Date: Fri, 03 Sep 2021 09:09:44 +0200 Message-ID: <87lf4eyw1z.fsf@gmail.com> References: <87k0jz9rri.fsf@gmail.com> <04ae9f30-5e65-d7de-501e-92d557ddf84c@gmail.com> <87bl5ad5g4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28337"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Monnier To: Stefan Monnier via Users list for the GNU Emacs text editor Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 03 09:10:32 2021 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 1mM3LL-0007AJ-Fl for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 03 Sep 2021 09:10:31 +0200 Original-Received: from localhost ([::1]:49120 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mM3LJ-0000yn-Mu for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 03 Sep 2021 03:10:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48406) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mM3Kh-0000ya-H7 for help-gnu-emacs@gnu.org; Fri, 03 Sep 2021 03:09:51 -0400 Original-Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:42739) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mM3Kd-0000oM-Vs for help-gnu-emacs@gnu.org; Fri, 03 Sep 2021 03:09:51 -0400 Original-Received: by mail-wr1-x42c.google.com with SMTP id q11so6745804wrr.9 for ; Fri, 03 Sep 2021 00:09:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=luShaxLSsUPGALvOXB4MzNwnnWUTputloaMEeX5/ucs=; b=jixr8A84wYrm0gLo/lZ7az25KtNevkaZv5izExSEmGswiNQJAQhsqtQEbPf+n/SNta hZnl67LpAng9ljRLhnvhvF8aTHYMlvjdy6kkYkdEBd3lQXVFmUV1eKtbGc1wC8zxXa4F PCQ/7rWpFYVmUAkQB/TOBrk8r/TR5MlDY7sQFKEtIArdyZ2C2NsoClxk7MC2nDqQ9LZ9 57ZuHhNPlsulAayGlMP0FpkNmLrwfAjGoU/TZKKYe4ykOBmLLIAab1CRCChcBy5JJxQf 8iFOfxu8HkN7TSKZ49RTKimxFP3TUJNPG4k6L03x1Gwk/B/hnYGKA7APnRqKVxhgd5DY /QSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=luShaxLSsUPGALvOXB4MzNwnnWUTputloaMEeX5/ucs=; b=YHzZLsvN8jaw8COCfmGgGAfjP8W45M0RArAK+hh4pwAaE9aZ+x75dwJWII9gk47SGf 2TkVhPfTFVBlVRMKHSZ36vyByd+ALCPe2ebpPwGcoCcoznawO0lAN2CRvPKgWMtKAUaf DlZf4wXsu68+qJtDAVGuxqCbufuOaJTKUVLEa5tSzcxUvf+Nr57fP5NmOFi9tVNFfX6S ZFG666Q6IRBIxNjjSit995EUIVJcSkhUg18RRrpmvjibw/UcW5UtHkdYZLbrbilRStmb qSxLUbrK7oAvHIdi2zS2rtDlgSxE+fUepjvnem7c3iH87UYqmZOxm+3T5M4iG/r2qemk 4+PA== X-Gm-Message-State: AOAM533Q4qzCmKeU4Qzxz9tHArADv69b+aqw1MKWmEMAhTa+oQv9sis6 RQqWrWXgy+0pckGl0t95b1c= X-Google-Smtp-Source: ABdhPJzorIltsmcYJsRl/Ev6j6LAqrEoyyarbDLI3bRvCRkJA8ts/biwblumZn43c3tpiG1lYnetdQ== X-Received: by 2002:a05:6000:344:: with SMTP id e4mr2176147wre.423.1630652986228; Fri, 03 Sep 2021 00:09:46 -0700 (PDT) Original-Received: from amdahl30 ([2a01:e0a:20e:d340:2ef0:5dff:fed2:7b49]) by smtp.gmail.com with ESMTPSA id t5sm4003743wra.95.2021.09.03.00.09.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 00:09:45 -0700 (PDT) In-Reply-To: (Stefan Monnier via Users list for the's message of "Thu, 02 Sep 2021 19:54:32 -0400") Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=kevin.legouguec@gmail.com; helo=mail-wr1-x42c.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.23 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" Xref: news.gmane.io gmane.emacs.help:132868 Archived-At: Stefan Monnier via Users list for the GNU Emacs text editor writes: >> I guess TRT would be to add a third step to check whether (char-before >> (point)) is a closing delimiter, and if so, skip back to its matching >> opener? With (forward-sexp -1)? And then assert whether we've hit a $ >> sign? > > Could be but that could also be dangerous, since we don't want to treat > $(cat food) as a single token. I think we'd want something a bit less generic. Not sure why we wouldn't want to treat $(cat food) as a single token? Do you mean, as opposed to ${cat_food}? IIUC, I'd like both $() and ${} to be skipped over for the purposes of indentation: #+begin_src sh ${top_dir}/foo --bar \ --baz $(git rev-parse --show-toplevel)/foo --bar \ --baz #+end_src > Also, the ...-backward-token and ...-forward-token need to be kept in-sync. Gotcha.