unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8876: 24.0.50; making `menu-bar-update-buffers' use another frame
@ 2011-06-15 22:06 Drew Adams
  2011-06-16  1:00 ` Stefan Monnier
  0 siblings, 1 reply; 10+ messages in thread
From: Drew Adams @ 2011-06-15 22:06 UTC (permalink / raw)
  To: 8876

Starting with Emacs 23, you changed `menu-bar-update-buffers' so that it
no longer uses `menu-bar-select-buffer'.  (That command is now used only
in msb.el.)
 
Instead of `menu-bar-select-buffer', `menu-bar-update-buffers' now uses
this:
 
 `(lambda ()
   (interactive)
   (switch-to-buffer ,(cdr pair))
 
Before Emacs 23 it was trivial to make menu choice use a separate frame:
trivially redefine `menu-bar-select-buffer' (or advise it, I suppose).
Here, for instance, is a redefinition that covers all versions of Emacs:
 
(defun menu-bar-select-buffer ()
  "Switch to `last-command-event' buffer in other frame."
  (interactive)
  (if (fboundp 'pop-to-buffer-other-frame) ; Emacs 24+
      (pop-to-buffer-other-frame last-command-event)
    (switch-to-buffer-other-frame last-command-event)))
 
But that is useless now, since `menu-bar-select-buffer' is no longer
called.
 
Dunno what the problem was with using `last-command-event', which caused
you to switch to the lambda code above.  Wouldn't
`menu-bar-select-buffer' work just as well?
 
What to do now, to make menu selection use another frame?  Copy and
modify trivially the long `menu-bar-update-buffers' definition, either
redefining it or (preferably) replacing it on `menu-bar-update-hook'?
Do you have another suggestion?
 
It was so simple and flexible before; it seems so complex and monolithic
now.
 
In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-06-13 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt --cflags
-Ic:/build/include'
 






^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-06-17 16:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-15 22:06 bug#8876: 24.0.50; making `menu-bar-update-buffers' use another frame Drew Adams
2011-06-16  1:00 ` Stefan Monnier
2011-06-16  2:24   ` Drew Adams
2011-06-16 13:47     ` Stefan Monnier
2011-06-17 14:48       ` Drew Adams
2011-06-21  1:49         ` Stefan Monnier
2011-06-21  1:50         ` Stefan Monnier
     [not found]         ` <<jwv4o3kgdgp.fsf-monnier+emacs@gnu.org>
2013-06-17 14:34           ` Drew Adams
2013-06-17 15:46             ` Michael Heerdegen
2013-06-17 16:26               ` Drew Adams

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).