From: Michal <rabbitko@tenbit.pl>
To: help-gnu-emacs@gnu.org
Subject: Re: defadvice question.
Date: Tue, 22 Sep 2009 18:05:35 +0200 [thread overview]
Message-ID: <m2ab0nt168.fsf@tenbit.pl> (raw)
In-Reply-To: mailman.7167.1253588521.2239.help-gnu-emacs@gnu.org
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
next prev parent reply other threads:[~2009-09-22 16:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-16 13:52 defadvice question Michal
2009-09-17 0:16 ` Andreas Politz
[not found] ` <mailman.6832.1253146594.2239.help-gnu-emacs@gnu.org>
2009-09-17 9:09 ` Michal
2009-09-22 3:01 ` Kevin Rodgers
[not found] ` <mailman.7167.1253588521.2239.help-gnu-emacs@gnu.org>
2009-09-22 16:05 ` Michal [this message]
2009-09-23 2:21 ` Kevin Rodgers
[not found] ` <mailman.7257.1253672525.2239.help-gnu-emacs@gnu.org>
2009-09-24 16:42 ` Michal
2009-09-25 2:48 ` Kevin Rodgers
[not found] ` <mailman.7485.1253846932.2239.help-gnu-emacs@gnu.org>
2009-09-28 16:24 ` Michal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2ab0nt168.fsf@tenbit.pl \
--to=rabbitko@tenbit.pl \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.