From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michal Newsgroups: gmane.emacs.help Subject: Re: defadvice question. Date: Tue, 22 Sep 2009 18:05:35 +0200 Organization: education Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1253637678 7766 80.91.229.12 (22 Sep 2009 16:41:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Sep 2009 16:41:18 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 22 18:41:09 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mq8QA-0000iZ-NH for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Sep 2009 18:40:55 +0200 Original-Received: from localhost ([127.0.0.1]:55263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mq8QA-000748-4l for geh-help-gnu-emacs@m.gmane.org; Tue, 22 Sep 2009 12:40:54 -0400 Original-Path: news.stanford.edu!usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!t-online.de!news.task.gda.pl!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 41 Original-NNTP-Posting-Host: jupiter.adlex.com Original-X-Trace: news.task.gda.pl 1253635573 9591 157.25.157.162 (22 Sep 2009 16:06:13 GMT) Original-X-Complaints-To: abuse@news.task.gda.pl Original-NNTP-Posting-Date: Tue, 22 Sep 2009 16:06:13 +0000 (UTC) X-Mailer: KMail/1.7.1 User-Agent: mozilla news reader Cancel-Lock: sha1:fQ99iHnTnr9WuBsKxDhgBb/rjpM= Original-Xref: news.stanford.edu gnu.emacs.help:173271 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:68390 Archived-At: 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 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