emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Buffer-menu-toggle-files-only should use Buffer-menu-revert, not rev


From: Luc Teirlinck
Subject: Re: Buffer-menu-toggle-files-only should use Buffer-menu-revert, not revert-buffer
Date: Sun, 21 Nov 2004 16:40:43 -0600 (CST)

Drew Adams wrote:

   `Buffer-menu-toggle-files-only' calls `revert-buffer', but it should instead
   call `Buffer-menu-revert'. This is the definition that should be changed:

I am not so sure, because I am not so sure what the purpose of
`Buffer-menu-revert' is.  It just calls `revert-buffer'.  As such it
_seems_ to exist for purposes of advice only.  However, if you want to
be sure that advice is _unconditionally_ executed if the Buffer Menu
gets reverted, you can _and_ have to advise
`Buffer-menu-revert-function'.  So if `Buffer-menu-revert' exists
really for advice it must exist for conditional advice.  Maybe for
things that should be executed only when reverting because the user
typed `g' or equivalent.  But I am guessing.  It would be good to know
for certain why `Buffer-menu-revert' exists.  (Its documentation string
is silent about that.)  After we know that we can make a decision.

In as far as what you want to do, however, I believe that you
_unconditionally_ want to refontify whenever the Buffer Menu gets
reverted for _any_ reason, in which case you should advise
`Buffer-menu-revert-function'.  It might be good to document such
things, which I could do, once I understand the purpose (if any) of
`Buffer-menu-revert' myself.

Sincerely,

Luc.





reply via email to

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