comparison lisp/x11/x-menubar.el @ 30:ec9a17fef872 r19-15b98

Import from CVS: tag r19-15b98
author cvs
date Mon, 13 Aug 2007 08:52:29 +0200
parents 441bb1e64a06
children e04119814345
comparison
equal deleted inserted replaced
29:7976500f47f9 30:ec9a17fef872
129 ["Multiplication Puzzle" mpuz t] 129 ["Multiplication Puzzle" mpuz t]
130 ) 130 )
131 ) 131 )
132 132
133 ("Options" 133 ("Options"
134 ,custom-help-menu
134 ["Read Only" (toggle-read-only) 135 ["Read Only" (toggle-read-only)
135 :style toggle :selected buffer-read-only] 136 :style toggle :selected buffer-read-only]
136 ("Editing Options" 137 ("Editing Options"
137 ["Overstrike" (progn 138 ["Overstrike" (progn
138 (overwrite-mode current-prefix-arg) 139 (overwrite-mode current-prefix-arg)
548 ["Grail" (setq browse-url-browser-function 'browse-url-grail) 549 ["Grail" (setq browse-url-browser-function 'browse-url-grail)
549 :style radio 550 :style radio
550 :selected (eq browse-url-browser-function 'browse-url-grail)] 551 :selected (eq browse-url-browser-function 'browse-url-grail)]
551 ) 552 )
552 "-----" 553 "-----"
553 ["Edit Faces..." cu-edit-faces t] 554 ["Browse Faces..." edit-faces t]
554 ("Font" :filter font-menu-family-constructor) 555 ("Font" :filter font-menu-family-constructor)
555 ("Size" :filter font-menu-size-constructor) 556 ("Size" :filter font-menu-size-constructor)
556 ("Weight" :filter font-menu-weight-constructor) 557 ("Weight" :filter font-menu-weight-constructor)
557 "-----" 558 "-----"
558 ["Save Options" save-options-menu-settings t] 559 ["Save Options" save-options-menu-settings t]
638 ["Recent Messages" view-lossage t] 639 ["Recent Messages" view-lossage t]
639 ("Misc" 640 ("Misc"
640 ["No Warranty" describe-no-warranty t] 641 ["No Warranty" describe-no-warranty t]
641 ["XEmacs License" describe-copying t] 642 ["XEmacs License" describe-copying t]
642 ["The Latest Version" describe-distribution t]) 643 ["The Latest Version" describe-distribution t])
643 ,custom-help-menu
644 ) 644 )
645 ))) 645 )))
646 646
647 647
648 (defun maybe-add-init-button () 648 (defun maybe-add-init-button ()
1148 ;; (list 'set-face-font ''modeline (face-font-name 'modeline)) 1148 ;; (list 'set-face-font ''modeline (face-font-name 'modeline))
1149 (if options-save-faces 1149 (if options-save-faces
1150 (cons 'progn 1150 (cons 'progn
1151 (mapcar #'(lambda (face) 1151 (mapcar #'(lambda (face)
1152 `(make-face ',face)) 1152 `(make-face ',face))
1153 (face-list)))) 1153 (save-options-non-customized-face-list))))
1154 1154
1155 (if options-save-faces 1155 (if options-save-faces
1156 (cons 'progn 1156 (cons 'progn
1157 (apply 'nconc 1157 (apply 'nconc
1158 (mapcar 1158 (mapcar
1167 ',(save-options-specifier-spec-list 1167 ',(save-options-specifier-spec-list
1168 face property)))) 1168 face property))))
1169 (delq 'display-table 1169 (delq 'display-table
1170 (copy-sequence 1170 (copy-sequence
1171 built-in-face-specifiers))))) 1171 built-in-face-specifiers)))))
1172 (face-list))))) 1172 (save-options-non-customized-face-list)))))
1173 1173
1174 )) 1174 ))
1175 "The variables to save; or forms to evaluate to get forms to write out. 1175 "The variables to save; or forms to evaluate to get forms to write out.
1176 This is used by `save-options-menu-settings' and should mirror the 1176 This is used by `save-options-menu-settings' and should mirror the
1177 options listed in the Options menu.") 1177 options listed in the Options menu.")
1178
1179 (defun save-options-non-customized-face-list ()
1180 "This function will return a list of all faces that have not been
1181 'customized'."
1182 (delq nil (mapcar '(lambda (face)
1183 (if (not (or (get face 'saved-face)
1184 (get face 'factory-face)))
1185 face))
1186 (face-list))))
1178 1187
1179 (defun save-options-specifier-spec-list (face property) 1188 (defun save-options-specifier-spec-list (face property)
1180 (if (not (or (eq property 'font) (eq property 'color))) 1189 (if (not (or (eq property 'font) (eq property 'color)))
1181 (specifier-spec-list (face-property face property) 'global) 1190 (specifier-spec-list (face-property face property) 'global)
1182 (let* ((retlist (specifier-spec-list (face-property face property) 1191 (let* ((retlist (specifier-spec-list (face-property face property)