From f48e845f51905b4c061917f2a504d03acc802baf Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 16 Feb 2005 09:47:37 +0000 Subject: [PATCH] (menu-bar-select-frame): FRAME defaults to selected. --- lisp/menu-bar.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 3fbc728f487..1c95e54dc5c 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -1515,9 +1515,11 @@ Buffers menu is regenerated." (dolist (f (frame-list)) (when (equal last-command-event (frame-parameter f 'name)) (setq frame f))) - (make-frame-visible frame) - (raise-frame frame) - (select-frame frame))) + ;; FRAME can be nil when user specifies the selected frame. + (setq frame (or frame (selected-frame))) + (make-frame-visible frame) + (raise-frame frame) + (select-frame frame))) (defun menu-bar-update-buffers-1 (elt) (let* ((buf (car elt)) -- 2.39.5