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

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

bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffe


From: Juri Linkov
Subject: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted
Date: Thu, 20 Jun 2024 19:38:58 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>>> And it makes sense to provide this feature to the users of
>>> xref-revert-buffer, so I don't see why not.
>> All things being equal, leaving the old names of the functions and
>> commands should be preferred.  That's all I'm saying.  It's a minor
>> issue, but the cost of staying more compatible is also minor.
>
> It might be important for the case when somebody has rebound 'g' in Xref
> buffers to some other letter - then they reference xref-revert-buffer by
> name in their init script.
>
> Having them end up with a subpar version of it (and perhaps not notice it
> either) feels like an unfortunate outcome.

So what is the decision?  Maybe better to keep xref-revert-buffer
as a wrapper around the new function xref--revert-buffer?

(defun xref-revert-buffer ()
  (let (restore-functions)
    (when (boundp 'revert-buffer-restore-functions)
      (run-hook-wrapped 'revert-buffer-restore-functions
                        (lambda (f) (push (funcall f) restore-functions) nil)))
    (prog1 (xref--revert-buffer)
      (mapc #'funcall (delq nil restore-functions)))))





reply via email to

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