From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 14570 invoked from network); 12 Feb 2022 16:35:29 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 12 Feb 2022 16:35:29 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nIvMt-00EDPJ-HQ for ml@inbox.vuxu.org; Sat, 12 Feb 2022 10:35:27 -0600 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94.2) (envelope-from ) id 1nIvMs-004FqS-Lz for ml@inbox.vuxu.org; Sat, 12 Feb 2022 10:35:26 -0600 Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtp (Exim 4.94.2) (envelope-from ) id 1nIvMr-004FqM-QZ for ding@lists.math.uh.edu; Sat, 12 Feb 2022 10:35:25 -0600 Received: from quimby.gnus.org ([95.216.78.240]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nIvMp-00EDOz-21 for ding@lists.math.uh.edu; Sat, 12 Feb 2022 10:35:25 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:Mime-Version:References:Message-ID:Date:Subject: From:To:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vRb+YSz9QITkXcH7lxIzAhWa3aT/pcZQ91GnPnZN2mM=; b=tBz0tpZPulVzXeQtUDJsgSha0C BeHq7rynAKk0qat8yDdMlVsipFoSaquu7uLzbIo9zl1XGHyVs4A9Zy93rG4OxRS3VhTP7NWKLFi+6 HgYCLc4q5yOlT3+ue9UkN4qUqxSERihUTslhnPJBd+rXAxlzjDO4HYQu52LXuESGZPCo=; Received: from ciao.gmane.io ([116.202.254.214]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nIvMh-0000w8-Nt for ding@gnus.org; Sat, 12 Feb 2022 17:35:18 +0100 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nIvMf-0007Jo-IH for ding@gnus.org; Sat, 12 Feb 2022 17:35:13 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: ding@gnus.org From: Eric Abrahamsen Subject: Re: make emacs handle 'if fi' like it does parens Date: Sat, 12 Feb 2022 08:35:06 -0800 Message-ID: <875ypk9h6t.fsf@ericabrahamsen.net> References: <87sfso2ifc.fsf@local.lan> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cancel-Lock: sha1:YnylGMnbxV9TC3o/yjQ1LiaKKZE= List-ID: Precedence: bulk hput writes: > Version: GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit,\ > cairo version 1.16.0, Xaw3d scroll bars) of 2021-11-05 > > Seems like google is getting harder and harder to find the right > strings to unearth wanted info. > > We have a fine manual but it doesn't respond well to the hill-billy > strings my imagination supplies when using the info 'i' or 's' > searches. > > At any rate, I'm not having much luck looking for ways to make emacs > handle 'if', 'fi' in any shell-scripting mode, like it does parens in > things like cperl-mode. > > I'd like to be able to jump between matching `if fi' and have the > matching pardner hilite as when putting cursor just after closing > paren. > > If it is possible using standard emacs commands already, maybe > someone will be kind enough to mention the combinations? If not, then > .. where might I find code that does what I'm after? (This probably should have gone to emacs.help, not emacs.gnus.general, fwiw) A brief test indicates that `forward-sexp' and `backward-sexp', bound to C-M-f and C-M-b, do what you want.