diff 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
line wrap: on
line diff
--- a/lisp/x11/x-menubar.el	Mon Aug 13 08:51:58 2007 +0200
+++ b/lisp/x11/x-menubar.el	Mon Aug 13 08:52:29 2007 +0200
@@ -131,6 +131,7 @@
       )
 
      ("Options"
+      ,custom-help-menu
       ["Read Only" (toggle-read-only)
        :style toggle :selected buffer-read-only]
       ("Editing Options"
@@ -550,7 +551,7 @@
 	:selected (eq browse-url-browser-function 'browse-url-grail)]
       )
       "-----"
-      ["Edit Faces..." cu-edit-faces t]
+      ["Browse Faces..." edit-faces t]
       ("Font"   :filter font-menu-family-constructor)
       ("Size"	:filter font-menu-size-constructor)
       ("Weight"	:filter font-menu-weight-constructor)
@@ -640,7 +641,6 @@
        ["No Warranty"		describe-no-warranty	t]
        ["XEmacs License"	describe-copying	t]
        ["The Latest Version"	describe-distribution	t])
-      ,custom-help-menu
       )
      )))
 
@@ -1150,7 +1150,7 @@
 	 (cons 'progn
 	       (mapcar #'(lambda (face)
 			   `(make-face ',face))
-		       (face-list))))
+		       (save-options-non-customized-face-list))))
      
      (if options-save-faces
 	 (cons 'progn
@@ -1169,13 +1169,22 @@
 				  (delq 'display-table
 					(copy-sequence
 					 built-in-face-specifiers)))))
-		       (face-list)))))
+		       (save-options-non-customized-face-list)))))
      
      ))
   "The variables to save; or forms to evaluate to get forms to write out.
 This is used by `save-options-menu-settings' and should mirror the
 options listed in the Options menu.")
 
+(defun save-options-non-customized-face-list ()
+  "This function will return a list of all faces that have not been
+'customized'."
+  (delq nil (mapcar '(lambda (face)
+		      (if (not (or (get face 'saved-face)
+				   (get face 'factory-face)))
+			  face))
+		    (face-list))))
+
 (defun save-options-specifier-spec-list (face property)
   (if (not (or (eq property 'font) (eq property 'color)))
       (specifier-spec-list (face-property face property) 'global)