* 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.
"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))
(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
(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))