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

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

Re: Defadvice use


From: rgb
Subject: Re: Defadvice use
Date: 18 Apr 2005 12:05:47 -0700
User-agent: G2/0.2

Johan Bockgård wrote:
> "rgb" <rbielaws@i1.net> 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?



reply via email to

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