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: Dmitry Gutov
Subject: bug#71466: 30.0.50; Buffer-menu-group-by non-nil resets point when Buffer List is reverted
Date: Wed, 26 Jun 2024 02:14:45 +0300
User-agent: Mozilla Thunderbird

On 25/06/2024 15:54, Eli Zaretskii wrote:
Date: Tue, 25 Jun 2024 01:42:46 +0300
Cc: Eli Zaretskii<eliz@gnu.org>,me@eshelyaron.com,71466@debbugs.gnu.org
From: Dmitry Gutov<dmitry@gutov.dev>

On 24/06/2024 09:27, Juri Linkov wrote:
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")
That is my opinion as well: better obsolete it this way.
Why obsolete it at all?  If we use an alias without obsoleting, I
think everyone wins.  No?

Well, we normally obsolete functions that aren't in use anymore, nor recommended for third parties. Right?

We can stop from obsoleting it now (just make an alias), but add a comment to do that in the next Emacs release. How about that?





reply via email to

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