From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.bugs Subject: bug#57481: elisp code utilising derived-mode-parent Date: Wed, 31 Aug 2022 13:31:15 +0200 Message-ID: References: Mime-Version: 1.0 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="37149"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 57481@debbugs.gnu.org To: Phil Sainty Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 31 13:32:13 2022 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 1oTLx5-0009P8-UJ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Aug 2022 13:32:11 +0200 Original-Received: from localhost ([::1]:41396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTLx4-0004gj-Ks for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 31 Aug 2022 07:32:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54610) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTLww-0004gJ-KC for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2022 07:32:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48665) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTLww-0002Yp-2O for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2022 07:32:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oTLwv-0005wr-Pe for bug-gnu-emacs@gnu.org; Wed, 31 Aug 2022 07:32:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Christopher Dimech Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 31 Aug 2022 11:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57481 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 57481-submit@debbugs.gnu.org id=B57481.166194549222826 (code B ref 57481); Wed, 31 Aug 2022 11:32:01 +0000 Original-Received: (at 57481) by debbugs.gnu.org; 31 Aug 2022 11:31:32 +0000 Original-Received: from localhost ([127.0.0.1]:38414 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTLwR-0005w6-NT for submit@debbugs.gnu.org; Wed, 31 Aug 2022 07:31:31 -0400 Original-Received: from mout.gmx.net ([212.227.17.22]:56031) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTLwP-0005vr-9n for 57481@debbugs.gnu.org; Wed, 31 Aug 2022 07:31:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1661945475; bh=FxYBAKdw2hRaiZ/pCi81qLymPc/WFTxQvHu4rmUEnTI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=bqFgKZFugV1/0NVhsOgqd4NA2rCBhmfPgGXIlkXTqLM+WzB302XJ98+hHFqh011bH HzOcdfIST0rHusGymoVTxjEGlnXa0/ngRCCpzpJPC+Tfw6ND+EsihCipn51vU5+0Tm usVMELLbyO3fixmPHvar6vu/f4pyJlL2MGSlTEWI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [92.251.127.164] ([92.251.127.164]) by web-mail.gmx.net (3c-app-mailcom-bs01.server.lan [172.19.170.58]) (via HTTP); Wed, 31 Aug 2022 13:31:15 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:7e8wZev8BZxLvCMLCajMLZyKQAWJoNANDEXw3400Q3rUGrcTKi2nt+BqmVyKZvbcev2mI lFIN6kkQu4B8IBf5/f8u578Qi7Fck77djHM5GxX6ZPC+58pWclH8t/2AbdEPKyMS0micSAW69YqQ YBiCUmPMNfeoPfqPmr04Y79LIlPOgxPn/RVEspn8ehdq1Tq6USM0tVt5gG+uf1xjC1qvdAw49B6g pTYySCWDL0VtZLiWOddYIVTTce3ldlMg7GB+MAgp5bq1nwonJ38lCVA+yD4mocI4LQqijtljIOgM iU= X-UI-Out-Filterresults: notjunk:1;V03:K0:39fS4fIf5Z4=:aSpWw2GbXPXHNbOwogHUoT 4uULPApr6njuaDNaS0BWBw4t1sSFaVjwLedXNUU0gfENH4JpH587keUoBlJPKjCTmjsDEMGTH zBNunKCnDYRjjfbxQWGmUD1yjSTN46vsa12nc5af8diCmcmHqi8ZrMXYt4R6Nomj/ppkwNHnz 4HPgDpVYjw3Jkf5straOCeBw2E4bVr8le1FCb4HoWtTCUGog6sZIyPLdjXxKo/t/PTDPOVD3h v+HWJY5OhAbiENXlNcVvr28bNyznIzHJ3n70qFEC2vrxdKi6emIbGDC3UkeHk3BpihlsVBewZ 6DgpOJYDgr3j5ExTkq0GXLhSGndlysGPQgnt91vh/VTijhY0QpaTnVitPFXq33GVCl9rbZgOf R33CaiB6eOAxkJwF7CQe1bFnhFEHb37QKN5/Cgj6YZFZPOUUS+U702+akupxEAasXmFuv4RHq DthHPNbDsG9i2UTLlcDCHLxzI9KbxvhOMu1pEQ1cKKPcKox/h5h5KPvPd6zxNxogEqxigDRwd 5Ckc8Dm881mrACUL1ClWJwnhpugrYfSPsuU99wyGkZuQngYOX84HQroVOl4HwzBk0uzqVFx7I 9BFyYRcMWUrjZu4wTQV3IlSPxAHGYBpQGiB1ELXRoSkjQsaOljlxk3MFPC8lEu/I+yBCVwaT5 V4RnwhXWP+QOg2YfzugHrDGXbkXjvSwW88wqoCezxLdR4V/amyGovPJm5sBaMrk1/CB7ckFS0 pDYMszWuXI+uNRQyj0FC7nFAzqkz2N8Cr05qpANlYf2eNoQqWVGLr/LRT8lCZlHrEVThsX/g 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" Xref: news.gmane.io gmane.emacs.bugs:241185 Archived-At: > Sent: Tuesday, August 30, 2022 at 6:37 PM > From: "Phil Sainty" > To: "Christopher Dimech" > Cc: 57481@debbugs.gnu.org > Subject: Re: bug#57481: elisp code utilising derived-mode-parent > > You can derive (as it were) such a function from the code of > `provided-mode-derived-p' like so: > > > (defun derived-mode-chain (mode) > "Return the chain of derived modes for MODE." > (let (chain) > (while (progn (push mode chain) > (let* ((parent (get mode 'derived-mode-parent)) > (parentfn (symbol-function parent))) > (setq mode (if (and parentfn (symbolp parentfn)) > parentfn > parent))))) > (nreverse chain))) > > > (derived-mode-chain 'latex-mode) > =3D> (latex-mode tex-mode text-mode) > Have not encountered "(while" with "(progn" in "(while (progn". Could you= be so kind to explain it?