[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem advising nreverse.
From: |
Pascal J. Bourguignon |
Subject: |
Re: Problem advising nreverse. |
Date: |
Mon, 14 Dec 2009 18:56:11 +0100 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin) |
Sergei Organov <osv@javad.com> writes:
> You see, I wanted automatic elisp-only solution to "fixing"
> ewoc-collect, but only if it indeed happens to be buggy. Manual
> reloading is not an option then. Alternate approach would be to execute
> simple test-case to determine if ewoc-collect is indeed buggy and then
> re-define it to the correct version if so. That's what I'm going to
> implement now, provided there doesn't seem to be a way to do what I want
> by means of advising ewoc-collect and nreverse.
I see.
Perhaps you can statically characterize what version (variables
emacs-version, emacs-major-version, emacs-minor-version) contains the
broken ewoc, and then just redefine it in these versions, in your
~/.emacs:
(require 'ewoc)
(when (or (< emacs-version-major NN)
(and (= emacs-version-major NN)
(< emacs-version-minor MM)))
(defun ewoc-collect (...)
...))
or else, if you can detect the broken version with a test:
(require 'ewoc)
(unless (equal 'expected-result
(ewoc-collect 'test-arguments))
(defun ewoc-collect (...)
...))
(you can add a (byte-compile 'ewoc-collect) after the defun in either
case if you need it fast).
--
__Pascal Bourguignon__
- Problem advising nreverse., Sergei Organov, 2009/12/11
- Re: Problem advising nreverse., Pascal J. Bourguignon, 2009/12/12
- Message not available
- Re: Problem advising nreverse., Pascal J. Bourguignon, 2009/12/14
- Re: Problem advising nreverse., Sergei Organov, 2009/12/14
- Message not available
- Re: Problem advising nreverse.,
Pascal J. Bourguignon <=
- Re: Problem advising nreverse., Sergei Organov, 2009/12/14
- Message not available
- Re: Problem advising nreverse., Pascal J. Bourguignon, 2009/12/14
- Re: Problem advising nreverse., Sergei Organov, 2009/12/15
- Re: Problem advising nreverse., Sergei Organov, 2009/12/15
- Message not available
- Re: Problem advising nreverse., Pascal J. Bourguignon, 2009/12/15
- Message not available
- Re: Problem advising nreverse., Barry Margolin, 2009/12/15
- Re: Problem advising nreverse., Sergei Organov, 2009/12/16
- Message not available
- Re: Problem advising nreverse., Barry Margolin, 2009/12/17