changeset 10954:d9ab06338f6a

(add-menu-item-1): Better error message if a menu not the last in the path does not exist.
author Richard M. Stallman <rms@gnu.org>
date Sat, 11 Mar 1995 03:55:14 +0000
parents ba4240ca6b99
children 1bbdc8c907ea
files lisp/emacs-lisp/lmenu.el
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/lmenu.el	Sat Mar 11 02:17:04 1995 +0000
+++ b/lisp/emacs-lisp/lmenu.el	Sat Mar 11 03:55:14 1995 +0000
@@ -358,6 +358,8 @@
 		    (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