From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "rgb" Newsgroups: gmane.emacs.help Subject: Re: Defadvice use Date: 18 Apr 2005 12:05:47 -0700 Organization: http://groups.google.com Message-ID: <1113851147.155814.314630@g14g2000cwa.googlegroups.com> References: <1113844268.703229.310830@g14g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1113851266 4029 80.91.229.2 (18 Apr 2005 19:07:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 18 Apr 2005 19:07:46 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 18 21:07:42 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DNbZU-0007Oi-77 for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Apr 2005 21:06:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DNbdd-0004XI-OJ for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Apr 2005 15:10:29 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!g14g2000cwa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: 198.74.20.77 Original-X-Trace: posting.google.com 1113851156 12102 127.0.0.1 (18 Apr 2005 19:05:56 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 18 Apr 2005 19:05:56 +0000 (UTC) In-Reply-To: User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: g14g2000cwa.googlegroups.com; posting-host=198.74.20.77; posting-account=C7LM4w0AAAD23IRuMuUUJVCLQTuHhTK8 Original-Xref: shelby.stanford.edu gnu.emacs.help:130219 Original-To: help-gnu-emacs@gnu.org 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:25787 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:25787 Johan Bockg=E5rd wrote: > "rgb" writes: > > > ; I don't like bookmark mouse-2 opening the file in another window. > > ; There doesn't seem to be any other way to fix the problem. The > > ; theory here is to temporarily re-define the function that the mouse > > ; handler does call giving it the definition of the function I wish it > > ; would call. > > (defadvice bookmark-bmenu-other-window-with-mouse > > (around my-fix first () activate) ;rgb 2004 > > "Changes behavior to open file in same window, not other-window." > > (let (bookmark-bmenu-other-window) > > (fset 'bookmark-bmenu-other-window > > (symbol-function 'bookmark-bmenu-this-window)) > > ad-do-it)) > > This permanently redefines `bookmark-bmenu-other-window'. > I don't understand why. Doesn't (let (bookmark-bmenu-other-window) ...) have limited life. Perhaps my experiments were flawed but they made me think this worked. Could you explain?