[AC] Bug fix in menubar.el
Michael Sperber <[email protected]>
| Newsgroups | gmane.emacs.xemacs.patches |
|---|---|
| Message-ID | <[email protected]> |
Byrel Mitchell <[email protected]> writes: > A couple functions in menubar.el (add-menu-item-1, and delete-menu-item) > assume that any operations on a top-level menu are operations on > current-menubar, and so overwrite it, regardless of whether this menu was > passed in as an argument. > > A test case: > > (progn (setq my-menu '(("File" "---"))) > (add-submenu nil '("Edit" "Editting") nil my-menu) > (delete-menu-item '("File") my-menu) > (and (assoc "Edit" my-menu) (not (assoc "File" my-menu)))) > > This should return t; it removes one submenu and adds another. On a 21.5.34 > system, however, it will return nil as both add-submenu and > delete-menu-item will fail to operate on the local menu. (It won't in fact > clobber the current menu; this example's safe.) > > I'm attaching a patch to fix this. Thanks - I've applied and pushed the fix. -- Regards, Mike