(add-menu-item-1): Better error message if

a menu not the last in the path does not exist.
This commit is contained in:
Richard M. Stallman 1995-03-11 03:55:14 +00:00
parent b75f9a7686
commit 6f57a741f9

View file

@ -358,6 +358,8 @@ menu item called \"Item\" under the \"Foo\" submenu of \"Menu\"."
(car (find-menu-item (cdr so-far) (list (car rest))))))
(or menu
(let ((rest2 so-far))
(or rest2
(error "Trying to modify a menu that doesn't exist"))
(while (and (cdr rest2) (car (cdr rest2)))
(setq rest2 (cdr rest2)))
(setcdr rest2