diff lisp/menubar.el @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents b8cc9ab3f761
children
line wrap: on
line diff
--- a/lisp/menubar.el	Mon Aug 13 11:19:22 2007 +0200
+++ b/lisp/menubar.el	Mon Aug 13 11:20:41 2007 +0200
@@ -30,7 +30,7 @@
 
 ;; This file is dumped with XEmacs (when menubar support is compiled in).
 
-;; Some stuff in FSF menu-bar.el is in menubar-items.el
+;; Some stuff in FSF menu-bar.el is in x-menubar.el
 
 ;;; Code:
 
@@ -128,6 +128,19 @@
 			     menuitem)))
 	  (setq plistp (or (>= L 5)
 			   (and (> L 2) (keywordp (aref menuitem 2)))))
+	  (or (stringp (aref menuitem 0))
+	      (signal 'error
+		      (list
+		       "first element of a button must be a string (the label)"
+		       menuitem)))
+	  (or plistp
+	      (< L 4)
+	      (null (aref menuitem 3))
+	      (stringp (aref menuitem 3))
+	      (signal 'error
+		      (list
+		       "fourth element of a button must be a string (the label suffix)"
+		       menuitem)))
 	  (if plistp
 	      (let ((i 2)
 		    selp