From: Richard M. Stallman Date: Wed, 16 Feb 2005 09:47:37 +0000 (+0000) Subject: (menu-bar-select-frame): FRAME defaults to selected. X-Git-Tag: ttn-vms-21-2-B4~2254 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f48e845f51905b4c061917f2a504d03acc802baf;p=emacs.git (menu-bar-select-frame): FRAME defaults to selected. --- 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))