From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Towards a cleaner build: eieio Date: Mon, 17 Jun 2019 11:40:30 +0200 Message-ID: References: <83a7eo9nsh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="215906"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 17 11:41:02 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hco8K-000tzz-Jq for ged-emacs-devel@m.gmane.org; Mon, 17 Jun 2019 11:41:00 +0200 Original-Received: from localhost ([::1]:45590 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hco8J-00068s-CC for ged-emacs-devel@m.gmane.org; Mon, 17 Jun 2019 05:40:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58296) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hco7x-00068a-LY for emacs-devel@gnu.org; Mon, 17 Jun 2019 05:40:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hco7w-0001hz-Eo for emacs-devel@gnu.org; Mon, 17 Jun 2019 05:40:37 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:36802) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hco7w-0001ha-7n for emacs-devel@gnu.org; Mon, 17 Jun 2019 05:40:36 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hco7r-0003HY-2r for emacs-devel@gnu.org; Mon, 17 Jun 2019 11:40:33 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEUTLnXb2dmIjJsRK3IQ JmcKECIBAAIRKm79/fzl4+QSLXQrPW7////o5+jDwcPy8vHoPNFEAAACSUlEQVQ4jYXST2jaUBgA 8Ee6k4NCbgrWup2EV9rCcwRyGhQRttusCtttM68HjyEEvHmbkB56s6A11G6Cx9522EFPEb407NZA 0qKnHSRjR8GNvRgtia3sXV54v/f9eS8PieJVX0xvIR3FOOQPDhYDiSQry+kY0rv9ywVkliCrikzS MUK6iEXo6LkzivP8LgOSramYiCSmX7I4tA03mcnkBSAi5PIq1gXSFReppjAcT14yUNXSEcF6Nt8/ 5ILSg52Un0rN0oKAxVfvdZ0LSg/4xFkckJClZQEffj2uEQacBjD0xt4BA4We9DHJFWt9Luh16E32 9wIgWCjR11vcm23/BDdeypsC6imliox7lB713lWT8DCQkKOVGr6SaOHLx+8QAjVHT2SclaTCs29a GIgiMchLUvFtC8IgswgFlyktTiECqkI/KfiYVjMA6xGUYqm62G+2NTBc16+FyiVKS/h67q8bTXDZ suH6UClR6ToehJu3wWywNpD0YT/+kNh0gvmUwTxSshEcxdIARXuB+2ByHoHlbIBlsjXgnVWyKPwd x1fJomAdjFPJIFkURvyetdvwWp31dq1f8dEoMUlajgkRMLXzP8D7nY3CcOretb1x4m6nbds/w3Dr 326dT/idJcNgszfoXqTmDVYsAnUHDG1mu+yAAy0M5sxevYYfEIbBHBrLLW4EDL5jLF6i1mlFAM7N ZsP/bbPPThR+Q12bua49H0EU6gDNxcf9GvjX6Kcy548BZh1odOAJAOvMhicBLHcDQHITtDYB/Af+ AT4f8dXDPn5hAAAAAElFTkSuQmCC In-Reply-To: (Stefan Monnier's message of "Sun, 16 Jun 2019 21:03:32 -0400") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 80.91.231.51 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:237769 Archived-At: Stefan Monnier writes: >> No, we probably don't care much in this particular instance, but it was >> a really simple one to use as a test case. > > LGTM, I've now rewritten the object-prints to be cl-print-objects (and had to introduce a new method to get the output to be identical (probably not very important, but...)), so I thought I was going to go ahead and suppress this fallback method in eieio.el: In toplevel form: emacs-lisp/eieio.el:857:11:Warning: `object-print' is an obsolete function (as of 26.1); use `cl-print-object' instead. But! Somehow with-suppressed-warnings doesn't work in methods? (cl-defmethod cl-print-object ((object eieio-default-superclass) stream) "Default printer for EIEIO objects." ;; Fallback to the old `object-print'. (princ (object-print object) stream)) I can work around this trivially, but it would be nice if that macro worked here, too. Are cl-defmethods compiled in such a way that the bytecomp macrology magic is... done in a different order so that that doesn't work? Hm... with-no-warnings works... *scratches head* Oh! This patch was needed to get that macro working here, and Emacs had to be rebuilt for it to happen: diff --git a/lisp/emacs-lisp/cl-generic.el b/lisp/emacs-lisp/cl-generic.el index 9013c1f060..10190f4933 100644 --- a/lisp/emacs-lisp/cl-generic.el +++ b/lisp/emacs-lisp/cl-generic.el @@ -450,7 +450,7 @@ cl-defmethod `(progn ,(and (get name 'byte-obsolete-info) (or (not (fboundp 'byte-compile-warning-enabled-p)) - (byte-compile-warning-enabled-p 'obsolete)) + (byte-compile-warning-enabled-p 'obsolete name)) (let* ((obsolete (get name 'byte-obsolete-info))) (macroexp--warn-and-return (macroexp--obsolete-warning name obsolete "generic function") Now done. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no