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: Drew Adams
Subject: RE: Buffer-menu-toggle-files-only should use Buffer-menu-revert, not revert-buffer
Date: Sun, 21 Nov 2004 16:08:26 -0800

       `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.

You're right, Luc. Sorry for the confusion on my part. There is no bug here.
Thanks for clearing this up for me.

I imagine that `Buffer-menu-revert' is just to have a mode-specific command
binding (`g') for reversion - that is, for mode-specific reversion advice,
as you suggest.

Forget what I wrote in the bug report. I do, however, think it would be good
to have a hook at the end of `Buffer-menu-revert-function'. (The other hooks
I mentioned previously are not needed.)

---

I should not mix bug reports, but the following just occured to me:
buff-menu.el seems to be preloaded. There is no `provide buff-menu'. Yet,
there are user options like Buffer-menu-sort-column. How can a user set such
a variable with a defvar in his .emacs? The value won't take effect, because
buff-menu is preloaded. This should be fixed somehow, I think - we shouldn't
force users to use setq or defconst for user options, just to have them take
effect.

Thanks,

  Drew





reply via email to

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