From: Lars Ingebrigtsen Date: Wed, 17 Feb 2021 19:14:22 +0000 (+0100) Subject: Make unused `Buffer-menu-sort' alias obsolete X-Git-Tag: emacs-28.0.90~3675 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a5293c8dd389f7bb873dc0a5556eb74d66b0d332;p=emacs.git Make unused `Buffer-menu-sort' alias obsolete * lisp/buff-menu.el (Buffer-menu-sort): Make unused alias obsolete. * test/lisp/progmodes/elisp-mode-tests.el (find-defs-defalias-defun-el): Adjust test to use an alias that's not obsolete. --- diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 4022615a3b7..6df935fef8a 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el @@ -338,7 +338,8 @@ negative ARG, display other buffers as well." "Showing all non-internal buffers.")) (revert-buffer)) -(defalias 'Buffer-menu-sort 'tabulated-list-sort) +(define-obsolete-function-alias 'Buffer-menu-sort 'tabulated-list-sort + "28.1") (defun Buffer-menu-buffer (&optional error-if-non-existent-p) diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el index badcad670c2..f47d54e59c0 100644 --- a/test/lisp/progmodes/elisp-mode-tests.el +++ b/test/lisp/progmodes/elisp-mode-tests.el @@ -398,18 +398,21 @@ to (xref-elisp-test-descr-to-target xref)." "(cl-defstruct (xref-elisp-location") )) +(require 'em-xtra) +(require 'find-dired) (xref-elisp-deftest find-defs-defalias-defun-el - (elisp--xref-find-definitions 'Buffer-menu-sort) + (elisp--xref-find-definitions 'eshell/ff) (list - (xref-make "(defalias Buffer-menu-sort)" + (xref-make "(defalias eshell/ff)" (xref-make-elisp-location - 'Buffer-menu-sort 'defalias - (expand-file-name "../../../lisp/buff-menu.elc" emacs-test-dir))) - (xref-make "(defun tabulated-list-sort)" + 'eshell/ff 'defalias + (expand-file-name "../../../lisp/eshell/em-xtra.elc" + emacs-test-dir))) + (xref-make "(defun find-name-dired)" (xref-make-elisp-location - 'tabulated-list-sort nil - (expand-file-name "../../../lisp/emacs-lisp/tabulated-list.el" emacs-test-dir))) - )) + 'find-name-dired nil + (expand-file-name "../../../lisp/find-dired.el" + emacs-test-dir))))) ;; FIXME: defconst