From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#47454: plist-put should have a version which accepts multiple properties Date: Wed, 16 Jun 2021 12:55:49 -0400 Message-ID: References: <87sg2kc952.fsf@gnus.org> <87lf7cxgct.fsf@linkov.net> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34259"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Lars Ingebrigtsen , 47454@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 16 19:00:12 2021 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 1ltYtg-0008hA-Ai for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Jun 2021 19:00:12 +0200 Original-Received: from localhost ([::1]:47946 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ltYte-0002Pd-VQ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 16 Jun 2021 13:00:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45476) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ltYqe-0006ke-Dm for bug-gnu-emacs@gnu.org; Wed, 16 Jun 2021 12:57:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41716) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ltYqc-0007vn-CG for bug-gnu-emacs@gnu.org; Wed, 16 Jun 2021 12:57:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ltYqc-0000RQ-CE for bug-gnu-emacs@gnu.org; Wed, 16 Jun 2021 12:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 16 Jun 2021 16:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47454 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: wontfix Original-Received: via spool by 47454-submit@debbugs.gnu.org id=B47454.16238625771639 (code B ref 47454); Wed, 16 Jun 2021 16:57:02 +0000 Original-Received: (at 47454) by debbugs.gnu.org; 16 Jun 2021 16:56:17 +0000 Original-Received: from localhost ([127.0.0.1]:53260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltYpe-0000Pw-At for submit@debbugs.gnu.org; Wed, 16 Jun 2021 12:56:17 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:25977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ltYpZ-0000PU-Eu; Wed, 16 Jun 2021 12:56:01 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D26A78090B; Wed, 16 Jun 2021 12:55:51 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 6E44D80533; Wed, 16 Jun 2021 12:55:50 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1623862550; bh=VleAWlEsKtdSgfRkdMp1dzN8a5ikfx6IYxsCo59MBUU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=O5OTPJJrzOfsNnTCGy351lGUJIwcH2aPndb2cxaV6rippM+MiQBagaBO0d0TWiZmu b89Y4FMeU0TvL/otyjTHCN3HbqYXj43u/7bdVcxoB+esvMgY4zLRAaK6TG3oMCUhHd yjKQ/gyptGjxuJd6Qt5j2atc5RfoAq40zAhZ/cYjP36qz5c2sZjey+WB9oMKtFqSFV Ybh2NxSIxMorG1a5AgjMqTzaWA4k+PRmOJDUnORO+iULP6m4A7180Y8M48Z5S2D7LO LE//BIqR25UZY6Ib5pQqcsGxkItAWBksIYqah0XXKZIb+f4Nkzq7BtWwTZXloBsq3z Ov05RwuiI+KgQ== Original-Received: from alfajor (69-196-163-239.dsl.teksavvy.com [69.196.163.239]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 36D8D1201CF; Wed, 16 Jun 2021 12:55:50 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Tue, 15 Jun 2021 08:48:25 -0400") 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:208640 Archived-At: forcemerge 47454 49053 close 47454 49053 thanks Stefan Monnier [2021-06-15 08:48:25] wrote: > Juri Linkov [2021-06-15 00:53:54] wrote: > >>> (setf (seq-elt plist ...)) >>> >>> may help with that, though. >> >> BTW, often after pulling from master and recompiling, >> Emacs fails to start with such errors: >> >> Debugger entered--Lisp error: (error "(setf seq-elt) is already defined as >> something else than a generic function") >> error("%s is already defined as something else than a generic function" \(setf\ seq-elt\)) >> cl-generic-ensure-function(\(setf\ seq-elt\)) >> cl-generic-define-method(\(setf\ seq-elt\) nil (store (sequence array) n) >> nil #f(compiled-function (store sequence n) > > Hmm.... > > When you see that, could you show us the value of: > > (symbol-function '\(setf\ seq-elt\)) I installed the patch below which apparently fixes this problem Stefan diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 31aa0cb4f9..544704be38 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -568,17 +568,17 @@ cl-generic-define-method (cons method mt) ;; Keep the ordering; important for methods with :extra qualifiers. (mapcar (lambda (x) (if (eq x (car me)) method x)) mt))) - (let ((sym (cl--generic-name generic))) ; Actual name (for aliases). + (let ((sym (cl--generic-name generic)) ; Actual name (for aliases). + ;; FIXME: Try to avoid re-constructing a new function if the old one + ;; is still valid (e.g. still empty method cache)? + (gfun (cl--generic-make-function generic))) (unless (symbol-function sym) (defalias sym 'dummy)) ;Record definition into load-history. (cl-pushnew `(cl-defmethod . ,(cl--generic-load-hist-format (cl--generic-name generic) qualifiers specializers)) current-load-list :test #'equal) - ;; FIXME: Try to avoid re-constructing a new function if the old one - ;; is still valid (e.g. still empty method cache)? - (let ((gfun (cl--generic-make-function generic)) - ;; Prevent `defalias' from recording this as the definition site of + (let (;; Prevent `defalias' from recording this as the definition site of ;; the generic function. current-load-list ;; BEWARE! Don't purify this function definition, since that leads