+ (setq length (length button))
+
+ (cond
+ ((= length 1) ; [ "name" ]
+ (setq callback nil
+ activep nil))
+ ((= length 2) ; [ "name" callback ]
+ (setq callback (aref button 1)
+ activep t))
+ ((and (or (= length 3) (= length 4))
+ (not (keywordp (aref button 2))))
+ ;; [ "name" callback active-p ] or
+ ;; [ "name" callback active-p suffix ]
+ ;; We ignore the 'suffix' entry, because that is
+ ;; what the X code does.
+ (setq callback (aref button 1)
+ activep (aref button 2)))
+ (t ; 100% keyword specification
+ (let ((plist (cdr (mapcar 'identity button))))
+ (setq activep (plist-get plist :active)
+ callback (plist-get plist :callback)))))