i'm trying to get a menu into all the menubars of the live buffers,
and into the default menubar that will be put used with new buffers.
the following code looks like it should be working, even without the
second `set-menubar' form, but it's still not getting the Taskit menu
into all of the danged menubars.
(require 'cl)
(fset 'taskit-root-menu-filler 'ignore)
(defun taskit-install-menu ()
(or (assoc "Taskit" default-menubar)
(let ((posn (or (position "%_Options" default-menubar :key #'car
:test #'string=)
6)))
(set-menubar
;; hell. this doesn't install it in the menubars
;; of currently active buffers.
(append (subseq default-menubar 0 posn)
(list* (list "Taskit" :filter #'taskit-root-menu-filler)
(nthcdr posn default-menubar)))))
(dolist (buff (buffer-list))
;; double hell. this doesn't install it in the menubars
;; of all buffers, either.
(set-buffer buff)
(add-submenu
nil
(list "Taskit" :filter #'taskit-root-menu-filler)
"Options"
'current-menubar)))
;; and, finally, we get to repeat ourselves for the second time.
;; and it STILL doesn't get the menu into all of the menu-bars.
(add-submenu
nil
(list "Taskit" :filter #'taskit-root-menu-filler)
"Options"
))
(taskit-install-menu)
;; and, for convenience' sake:
(defun taskit-uninstall-menu ()
(set-menubar (remassoc "Taskit" default-menubar))
(dolist (buffer (buffer-list))
(set-buffer buffer)
(set-menubar (remassoc "Taskit" current-menubar))))
;; EOsnip
this is not-working on xemacs 21.4.5, with gtk widgets.
what's the deal?
what hoodoo does it take to get a menu into _all_ of the menubars?