From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: eieio, pretty printing, and edebug Date: Wed, 29 Oct 2014 22:34:59 -0400 Message-ID: References: <87d29dz81x.fsf@ericabrahamsen.net> <5450531F.1060601@siege-engine.com> <871tpqv406.fsf@ericabrahamsen.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1414636555 6468 80.91.229.3 (30 Oct 2014 02:35:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Oct 2014 02:35:55 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eric Abrahamsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Oct 30 03:35:48 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XjfaV-0007ar-Ju for ged-emacs-devel@m.gmane.org; Thu, 30 Oct 2014 03:35:47 +0100 Original-Received: from localhost ([::1]:50353 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjfaV-0005fU-1w for ged-emacs-devel@m.gmane.org; Wed, 29 Oct 2014 22:35:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjfZx-0005fC-FO for emacs-devel@gnu.org; Wed, 29 Oct 2014 22:35:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjfZl-0002o7-6A for emacs-devel@gnu.org; Wed, 29 Oct 2014 22:35:13 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:56622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjfZl-0002nx-2d for emacs-devel@gnu.org; Wed, 29 Oct 2014 22:35:01 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au4MAOatTlRFpY87/2dsb2JhbABcgw6DYoZ+y1MEAgKBHBcBAXyEAwEBAwFWIwULCzQSFBgNJIhLCctyAQEBAQYCAR+RCAeESwWyIIFvhBQhgnoBAQE X-IPAS-Result: Au4MAOatTlRFpY87/2dsb2JhbABcgw6DYoZ+y1MEAgKBHBcBAXyEAwEBAwFWIwULCzQSFBgNJIhLCctyAQEBAQYCAR+RCAeESwWyIIFvhBQhgnoBAQE X-IronPort-AV: E=Sophos;i="5.04,797,1406606400"; d="scan'208";a="95555147" Original-Received: from 69-165-143-59.dsl.teksavvy.com (HELO pastel.home) ([69.165.143.59]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 29 Oct 2014 22:34:59 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 272627CFF; Wed, 29 Oct 2014 22:34:59 -0400 (EDT) In-Reply-To: <871tpqv406.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 29 Oct 2014 16:40:41 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:176045 Archived-At: > objects to be a part of the "safety" routine -- would it be unreasonable > to make edebug aware of eieio, and move most of the logic of > `eieio-edebug-prin1-to-string' into `edebug-safe-prin1-to-string', > guarded by a `featurep'? I don't think it'd be better than using advice-add, actually. If you want it to be cleaner, the first step is to replace the edebug-prin1-to-string function with a variable edebug-prin1-to-string-function (so it's clear that it's meant to be changed), and hence to modify it with add-function rather than advice-add. The even better way, as mentioned earlier, is to change prin1's underlying infrastructure so eieio can hook into it. Stefan