comparison lisp/x11/x-menubar.el @ 108:360340f9fd5f r20-1b6

Import from CVS: tag r20-1b6
author cvs
date Mon, 13 Aug 2007 09:18:39 +0200
parents cf808b4c4290
children fe104dbd9147
comparison
equal deleted inserted replaced
107:523141596bda 108:360340f9fd5f
135 ["Mine Game" mine t] 135 ["Mine Game" mine t]
136 ) 136 )
137 ) 137 )
138 138
139 ("Options" 139 ("Options"
140 ,custom-help-menu
140 ["Read Only" (toggle-read-only) 141 ["Read Only" (toggle-read-only)
141 :style toggle :selected buffer-read-only] 142 :style toggle :selected buffer-read-only]
142 ("Editing Options" 143 ("Editing Options"
143 ["Overstrike" (progn 144 ["Overstrike" (progn
144 (overwrite-mode current-prefix-arg) 145 (overwrite-mode current-prefix-arg)
554 ["Grail" (setq browse-url-browser-function 'browse-url-grail) 555 ["Grail" (setq browse-url-browser-function 'browse-url-grail)
555 :style radio 556 :style radio
556 :selected (eq browse-url-browser-function 'browse-url-grail)] 557 :selected (eq browse-url-browser-function 'browse-url-grail)]
557 ) 558 )
558 "-----" 559 "-----"
559 ["Edit Faces..." cu-edit-faces t] 560 ["Browse Faces..." edit-faces t]
560 ("Font" :filter font-menu-family-constructor) 561 ("Font" :filter font-menu-family-constructor)
561 ("Size" :filter font-menu-size-constructor) 562 ("Size" :filter font-menu-size-constructor)
562 ("Weight" :filter font-menu-weight-constructor) 563 ("Weight" :filter font-menu-weight-constructor)
563 ,@(if (featurep 'mule) 564 ,@(if (featurep 'mule)
564 '("-----" 565 '("-----"
654 ["Recent Messages" view-lossage t] 655 ["Recent Messages" view-lossage t]
655 ("Misc" 656 ("Misc"
656 ["No Warranty" describe-no-warranty t] 657 ["No Warranty" describe-no-warranty t]
657 ["XEmacs License" describe-copying t] 658 ["XEmacs License" describe-copying t]
658 ["The Latest Version" describe-distribution t]) 659 ["The Latest Version" describe-distribution t])
659 ,custom-help-menu
660 ) 660 )
661 ))) 661 )))
662 662
663 663
664 (defun maybe-add-init-button () 664 (defun maybe-add-init-button ()
1173 ;; (list 'set-face-font ''modeline (face-font-name 'modeline)) 1173 ;; (list 'set-face-font ''modeline (face-font-name 'modeline))
1174 (if options-save-faces 1174 (if options-save-faces
1175 (cons 'progn 1175 (cons 'progn
1176 (mapcar #'(lambda (face) 1176 (mapcar #'(lambda (face)
1177 `(make-face ',face)) 1177 `(make-face ',face))
1178 (face-list)))) 1178 (save-options-non-customized-face-list))))
1179 1179
1180 (if options-save-faces 1180 (if options-save-faces
1181 (cons 'progn 1181 (cons 'progn
1182 (apply 'nconc 1182 (apply 'nconc
1183 (mapcar 1183 (mapcar
1192 ',(save-options-specifier-spec-list 1192 ',(save-options-specifier-spec-list
1193 face property)))) 1193 face property))))
1194 (delq 'display-table 1194 (delq 'display-table
1195 (copy-sequence 1195 (copy-sequence
1196 built-in-face-specifiers))))) 1196 built-in-face-specifiers)))))
1197 (face-list))))) 1197 (save-options-non-customized-face-list)))))
1198 1198
1199 ;; Mule-specific: 1199 ;; Mule-specific:
1200 (if (featurep 'mule) 1200 (if (featurep 'mule)
1201 `(if (featurep 'mule) 1201 `(if (featurep 'mule)
1202 (set-language-environment ',(current-language-environment)))) 1202 (set-language-environment ',(current-language-environment))))
1203 )) 1203 ))
1204 "The variables to save; or forms to evaluate to get forms to write out. 1204 "The variables to save; or forms to evaluate to get forms to write out.
1205 This is used by `save-options-menu-settings' and should mirror the 1205 This is used by `save-options-menu-settings' and should mirror the
1206 options listed in the Options menu.") 1206 options listed in the Options menu.")
1207
1208 (defun save-options-non-customized-face-list ()
1209 "This function will return a list of all faces that have not been
1210 'customized'."
1211 (delq nil (mapcar '(lambda (face)
1212 (if (not (or (get face 'saved-face)
1213 (get face 'factory-face)))
1214 face))
1215 (face-list))))
1207 1216
1208 (defun save-options-specifier-spec-list (face property) 1217 (defun save-options-specifier-spec-list (face property)
1209 (if (not (or (eq property 'font) (eq property 'color))) 1218 (if (not (or (eq property 'font) (eq property 'color)))
1210 (specifier-spec-list (face-property face property) 'global) 1219 (specifier-spec-list (face-property face property) 'global)
1211 (let* ((retlist (specifier-spec-list (face-property face property) 1220 (let* ((retlist (specifier-spec-list (face-property face property)