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: Mon, 24 Jun 2024 09:27:52 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)

>> So what is the decision?  Maybe better to keep xref-revert-buffer
>> as a wrapper around the new function xref--revert-buffer?
>
> That should work, though at the expense of duplicating some code.

I still don't understand how duplicating revert-buffer

+(defun xref-revert-buffer ()
+  "Refresh the search results in the current buffer."
+  (declare (obsolete revert-buffer "30.1"))
+  (interactive)
+  (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)))))

can be better than what Eshel proposed with an alias:

+ (define-obsolete-function-alias 'xref-revert-buffer #'revert-buffer "30.1")





reply via email to

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