From: Lars Ingebrigtsen Date: Mon, 31 May 2021 05:29:51 +0000 (+0200) Subject: Make `menu-bar-select-buffer' obsolete X-Git-Tag: emacs-28.0.90~2251 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2009832a8229ac90c255bdb0f2dd333e8a2a48be;p=emacs.git Make `menu-bar-select-buffer' obsolete * lisp/menu-bar.el (menu-bar-select-buffer): Make obsolete (bug#15651). * lisp/msb.el (msb--select-buffer): Move function here and rename. (msb--make-keymap-menu): Use it. --- diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index b71c6502077..739e751d8a4 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -2241,6 +2241,7 @@ Buffers menu is regenerated." "String to display in buffer listings for buffers not visiting a file.") (defun menu-bar-select-buffer () + (declare (obsolete nil "28.1")) (interactive) (switch-to-buffer last-command-event)) diff --git a/lisp/msb.el b/lisp/msb.el index 1064f940905..1f05e9db589 100644 --- a/lisp/msb.el +++ b/lisp/msb.el @@ -1052,9 +1052,12 @@ variable `msb-menu-cond'." (msb--split-menus-2 list 0 nil) list)) +(defun msb--select-buffer () + (interactive) + (switch-to-buffer last-command-event)) + (defun msb--make-keymap-menu (raw-menu) - (let ((end 'menu-bar-select-buffer) - (mcount 0)) + (let ((mcount 0)) (mapcar (lambda (sub-menu) (cond @@ -1063,7 +1066,7 @@ variable `msb-menu-cond'." (t (let ((buffers (mapcar (lambda (item) (cons (buffer-name (cdr item)) - (cons (car item) end))) + (cons (car item) 'msb--select-buffer))) (cdr sub-menu)))) (nconc (list (cl-incf mcount) (car sub-menu) 'keymap (car sub-menu))