[Mew-dist 06953] adding items to existing menus

sen_ml at example.com sen_ml at example.com
1998年 11月 18日 (水) 10:29:14 JST


hello-

  is there a good way to add items to the existing mew and mew/message
menus?  (or, is that not a good idea?)  

  for the mew menu i put something like:

  (add-hook
   'mew-summary-mode-hook
   (lambda ()
    (setq mew-summary-mode-menu-spec 
          (nconc mew-summary-mode-menu-spec 
                 (list "----" 
                       mew-mailto-menu-spec)))
    ;; got this section from mew-summary.el
    (easy-menu-define
     mew-summary-mode-menu
     mew-summary-mode-map
     "Menu used in Summary mode."
     mew-summary-mode-menu-spec))
   )

in my .emacs, where 'mew-mailto-menu-spec' is similar in structure to
'mew-summary-mode-menu-spec'.  this seems to work under vanilla emacs
(haven't tested xemacs yet).

  i'm writing some extensions to mew and i'd like to be able to place
the add-hook calls in the files implementing the extensions rather
than instruct users to place these in their .emacs-s so that it is
easier for users to try out the extensions.  or alternatively, if
there is a different way to modify existing menus so that the user
doesn't need to add much code to .emacs, that would be nice too.  for
example, placing something like:

  (add-hook 'mew-init-hook (lambda () (require 'mew-mailto)))

in .emacs seems reasonable to me, but, imho, it would be nice if the
user did not have to add too much more than that.

  in mew-gnus, mew-petname, and mew-wheel, there are instructions
which tell the user to place appropriate calls to add-hook in
appropriate places (e.g. .emacs).  is this the 'recommended' way?

  placing the add-hook call in the extension code appeared to work for
the mew menu (in summary mode), but not for the mew/message menu for
some reason (perhaps i am doing something wrong).

  any help would be appreciated.



Mew-dist メーリングリストの案内