[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Redefining a (cl-defmethod cl-print-object ...) temporarily?
From: |
Michael Heerdegen |
Subject: |
Re: Redefining a (cl-defmethod cl-print-object ...) temporarily? |
Date: |
Mon, 03 Mar 2025 10:18:21 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eduardo Ochs <eduardoochs@gmail.com> writes:
> QUESTION: what is the recommended way to redefine a "(cl-defmethod
> cl-print-object ...)" temporarily, run some code, and then restore the
> old definition?
Why does it have to be temporary? You could just install something that
overrides the original behavior or not, depending on some condition.
That could be a simple special variable you switch on and off, or bind
around code you want to affect.
And for trying out stuff and playing I'd just use a separate Emacs
session.
Michael.