changeset 60099:798f4c8b5626

(menu-bar-select-frame): FRAME defaults to selected.
author Richard M. Stallman <rms@gnu.org>
date Wed, 16 Feb 2005 09:47:37 +0000
parents adba0765157c
children 3fbab2787d99
files lisp/menu-bar.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/menu-bar.el	Wed Feb 16 09:41:02 2005 +0000
+++ b/lisp/menu-bar.el	Wed Feb 16 09:47:37 2005 +0000
@@ -1515,9 +1515,11 @@
     (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))