comparison lisp/menubar.el @ 5715:68f8d295be49

Support :visible in menu specifications.
author Jerry James <james@xemacs.org>
date Wed, 23 Jan 2013 11:48:46 -0700
parents 44b0b4ea5cae
children 580ebed3500a
comparison
equal deleted inserted replaced
5714:489e76b85828 5715:68f8d295be49
77 (list "menu name (first element) must be a string" menu))) 77 (list "menu name (first element) must be a string" menu)))
78 ;;(or (cdr menu) (signal 'error (list "menu is empty" menu))) 78 ;;(or (cdr menu) (signal 'error (list "menu is empty" menu)))
79 (setq menu (cdr menu))) 79 (setq menu (cdr menu)))
80 (let (menuitem item) 80 (let (menuitem item)
81 (while (keywordp (setq item (car menu))) 81 (while (keywordp (setq item (car menu)))
82 (or (memq item '(:config :included :filter :accelerator :active)) 82 (or (memq item '(:config :included :visible :filter :accelerator :active))
83 (signal 'error 83 (signal 'error
84 (list "menu keyword must be :config, :included, :accelerator, :active or :filter" 84 (list "menu keyword must be :config, :included, :visible, :accelerator, :active or :filter"
85 item))) 85 item)))
86 (if (or (not (cdr menu)) 86 (if (or (not (cdr menu))
87 (vectorp (nth 1 menu)) 87 (vectorp (nth 1 menu))
88 (keywordp (nth 1 menu))) 88 (keywordp (nth 1 menu)))
89 (signal 'error (list "strange keyword value" item (nth 1 menu)))) 89 (signal 'error (list "strange keyword value" item (nth 1 menu))))
133 item) 133 item)
134 (while (< i L) 134 (while (< i L)
135 (setq item (aref menuitem i)) 135 (setq item (aref menuitem i))
136 (cond ((not (memq item '(:active :suffix :keys :style 136 (cond ((not (memq item '(:active :suffix :keys :style
137 :full :included :selected 137 :full :included :selected
138 :accelerator))) 138 :visible :accelerator)))
139 (signal 'error 139 (signal 'error
140 (list (if (keywordp item) 140 (list (if (keywordp item)
141 "unknown menu item keyword" 141 "unknown menu item keyword"
142 "not a keyword") 142 "not a keyword")
143 item menuitem))) 143 item menuitem)))