help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: defadvice question.


From: Michal
Subject: Re: defadvice question.
Date: Tue, 22 Sep 2009 18:05:35 +0200
User-agent: mozilla news reader

Hallo Kevin.
Thank You very much for the answer.
Unfortunately I have problems with both solutions.

Did You check if it works on YOur site, or this is rather Your suggestion?

Kevin Rodgers <kevin.d.rodgers@gmail.com> writes:

>
> (defadvice cvs-checkout (before minibuffer-history)
>   "Add CVSROOT environment variable to `minibuffer-history'."
>   (interactive (let ((minibuffer-history
>                     (cons (getenv "CVSROOT") minibuffer-history)))
>                ...)))
>
> The tricky part is the "...".  You could copy the entire interactive form from
> cvs-checkout source in pcvs.el, but that defeats the whole purpose of using
> advice.  You might be able to work around it like this:

I C-u M-x cvs-checkout

call-interactively: Symbol's value as variable is void: \.\.\.


>
> (defvar cvs-checkout-interactive-form
>   (interactive-form 'cvs-checkout))
>
> (defadvice cvs-checkout (before minibuffer-history)
>   "Add CVSROOT environment variable to `minibuffer-history'."
>   (interactive (let ((minibuffer-history
>                     (cons (getenv "CVSROOT") minibuffer-history)))
>                (call-interactively `(lambda (&rest cvs-checkout-args)
>                                       ,cvs-checkout-interactive-form
>                                       cvs-checkout-args)))))

While this does not produce any error message, but my cvs root is not
put to minibuffer history.

best regards


reply via email to

[Prev in Thread] Current Thread [Next in Thread]