From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#67008: 30.0.50; Multiple major mode parents Date: Sat, 11 Nov 2023 11:14:47 +0100 Message-ID: <445405AC-C0DA-4914-984E-B42671AB536D@gmail.com> References: Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37338"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67008@debbugs.gnu.org, Ikumi Keita , Yuan Fu , Dmitry Gutov To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 11 11:16:12 2023 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 1r1l2A-0009a4-Sz for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Nov 2023 11:16:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1l1h-0003yV-SF; Sat, 11 Nov 2023 05:15:41 -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 1r1l1T-0003xw-8H for bug-gnu-emacs@gnu.org; Sat, 11 Nov 2023 05:15:28 -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 1r1l1N-0002NS-W4 for bug-gnu-emacs@gnu.org; Sat, 11 Nov 2023 05:15:26 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r1l22-00047q-6Y for bug-gnu-emacs@gnu.org; Sat, 11 Nov 2023 05:16:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Nov 2023 10:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67008 X-GNU-PR-Package: emacs Original-Received: via spool by 67008-submit@debbugs.gnu.org id=B67008.169969773915814 (code B ref 67008); Sat, 11 Nov 2023 10:16:02 +0000 Original-Received: (at 67008) by debbugs.gnu.org; 11 Nov 2023 10:15:39 +0000 Original-Received: from localhost ([127.0.0.1]:52086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1l1e-00046y-Ku for submit@debbugs.gnu.org; Sat, 11 Nov 2023 05:15:38 -0500 Original-Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]:46469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1l1c-00046i-C4 for 67008@debbugs.gnu.org; Sat, 11 Nov 2023 05:15:37 -0500 Original-Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2c50305c5c4so40035701fa.1 for <67008@debbugs.gnu.org>; Sat, 11 Nov 2023 02:14:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699697690; x=1700302490; darn=debbugs.gnu.org; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=ygAg3hJxwM8dX3SCnp3G1mdOCiX0Dr5Y38x5OsrawOc=; b=RfR19ivvY/NZjZ96soWMDkUs4w2Tm9dUSm/Jz4os6dEwZ9E1hcOcENj5BOPubB8JsL D+SNCK9Gzm4PytCdOa/ES7cshZVNidw6ip0hAyOOSsiZOVKmf9fwVkIZbjHQx2U0s4Zg OWKY9rYtBbAjxvM7vxZOJUbKYT9qoAdOxyLWiHurIQmqfpuYOEGuYgQCwhuHT+FFWPUy thGRtL+7dAGrfKUnnQjYcyTDV68UkhcNCCHY5daxGesuhy+56ys74b963Spsj27zXPcm 8OxoucaaKvlyZ0bKc8r1HhQWZwvBgM3rs++FipdyRK/qv7vzC52321AbiUY5ex8JvG+c 4K5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699697690; x=1700302490; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ygAg3hJxwM8dX3SCnp3G1mdOCiX0Dr5Y38x5OsrawOc=; b=lJ4fFnonetpU5DwG6LB7Ls2N71RTTont2A9i+KR2JCG01IC1fFrFgz+oHD700q6jH7 e4NCpG+nwUDBSyDv9QozL2F8PCzpZbwbS3JNs9fBcrfF0b1/YZCpbNcdmREKFYsaru0a WQC8mUKCYteNWM4ojOD7ZizA8TeH/uxrxIR3WkkWUEgrT18gOiWcIKq7rUZSunY780te 3V7DsY9MxtcRNB03qRZxd9OmmetzmW2RmLVifQz0sIXjRJnqvMsu0KS7Zd9SzjD0TJRT izXs0eJrH+KoMOgY5weWknzQXAuCpmY0g+jRDD0HfWuiD9wrInIMRmAkmQaWwBMy+qBC nydg== X-Gm-Message-State: AOJu0Yyh1REs6t/rr00fvkJaCl3xO78TH6z/Gu1FV4ggqHSCZSO3kHXZ h8T76J+nXRojMZoHxCi3diA= X-Google-Smtp-Source: AGHT+IGtZSo2eyWezQkfvB+rNtLH6sucNDJ8K2LzSvfE8Sug974OfuQ9oKI7uo2d2YFqz9vq902I6w== X-Received: by 2002:ac2:5dea:0:b0:509:493d:25a3 with SMTP id z10-20020ac25dea000000b00509493d25a3mr980426lfq.11.1699697689604; Sat, 11 Nov 2023 02:14:49 -0800 (PST) Original-Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id s4-20020a056512314400b004ff973cb14esm232164lfi.108.2023.11.11.02.14.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Nov 2023 02:14:48 -0800 (PST) X-Mailer: Apple Mail (2.3654.120.0.1.15) 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:274148 Archived-At: Thank you, I can see how this would be useful. > * lisp/subr.el (merge-ordered-lists): New function.=20 That's nice to have, indeed. The implementation is a bit imperative (and quadratic?) but I assume it = was tuned for performance (on small inputs). > + "Merge LISTS in a consistent order. > +LISTS is a list of lists of elements. > +Merge them into a single list containing the same elements (removing > +duplicates) and obeying their relative positions in each list. I think the doc string should mention C3, and that we use `eq` as = equivalence predicate here. > +If a consistent order does not exist, call ERROR-FUNCTION with > +the remaining lists. > +It should return the candidate to use to continue the merge > +By default we choose the first element of the first list." It's not obvious from the text what the arguments to such an = error-function would look like and what the return value should be. None = of the existing three callers seem to use this argument, for that = matter. Given that `eieio--c3-merge-lists` raises an error if there is no total = order, shouldn't the new code do so? And we definitely should have tests (I completely understand that you = didn't bothered writing any for something that may or may not actually = be used). (Really wish we could hive off the whole CEDET tree to ELPA one day.)