Subject: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted

From: Eli Zaretskii <[email-masked]>
Date: Tue, 18 Jun 2024 15:58:45 +0300

> Cc: [email-masked], Juri Linkov <[email-masked]>
> Date: Tue, 18 Jun 2024 09:00:38 +0200
> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
>  @item g
> -@findex xref-revert-buffer
> -Refresh the contents of the @file{*xref*} buffer
> -(@code{xref-revert-buffer}).
> +Refresh the contents of the @file{*xref*} buffer (@code{revert-buffer}).
> +@xref{Reverting}.

Why remove the index entry?  It needs to be rewritten, not removed.

> +** Xref
> +
> +*** 'xref-revert-buffer' is obsolete, prefer 'revert-buffer' instead.
> +The former is now an alias of the latter.  The Xref results buffer sets

Please use "The Xref buffer".  "The Xref results buffer" reads
awkwardly, and there actually is no such thing as "Xref results".

> @@ -1011,6 +1010,7 @@ xref--xref-buffer-mode
>          #'xref--imenu-extract-index-name)
>    (setq-local add-log-current-defun-function
>                #'xref--add-log-current-defun)
> +  (setq-local revert-buffer-function #'xref--revert-buffer)
>    (setq-local outline-minor-mode-cycle t)
>    (setq-local outline-minor-mode-use-buttons 'insert)
>    (setq-local outline-search-function
> @@ -1273,22 +1273,16 @@ xref--show-common-initialize
>            xref--original-window-intent (assoc-default 'display-action alist))
>      (setq xref--fetcher fetcher)))
>  
> -(defun xref-revert-buffer ()
> +(defun xref--revert-buffer (&rest _)     ; Ignore `revert-buffer' args.
>    "Refresh the search results in the current buffer."

And I wonder why you preferred a backward-incompatible change to a
backward-compatible one: leave the function's name alone, and just set
up revert-buffer-function to invoke it.  Was this not possible for
some technical reason that evades me?