diff 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
line wrap: on
line diff
--- a/lisp/x11/x-menubar.el	Mon Aug 13 09:17:27 2007 +0200
+++ b/lisp/x11/x-menubar.el	Mon Aug 13 09:18:39 2007 +0200
@@ -137,6 +137,7 @@
       )
 
      ("Options"
+      ,custom-help-menu
       ["Read Only" (toggle-read-only)
        :style toggle :selected buffer-read-only]
       ("Editing Options"
@@ -556,7 +557,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)
@@ -656,7 +657,6 @@
        ["No Warranty"		describe-no-warranty	t]
        ["XEmacs License"	describe-copying	t]
        ["The Latest Version"	describe-distribution	t])
-      ,custom-help-menu
       )
      )))
 
@@ -1175,7 +1175,7 @@
 	 (cons 'progn
 	       (mapcar #'(lambda (face)
 			   `(make-face ',face))
-		       (face-list))))
+		       (save-options-non-customized-face-list))))
 
      (if options-save-faces
 	 (cons 'progn
@@ -1194,7 +1194,7 @@
 				  (delq 'display-table
 					(copy-sequence
 					 built-in-face-specifiers)))))
-		       (face-list)))))
+		       (save-options-non-customized-face-list)))))
 
      ;; Mule-specific:
      (if (featurep 'mule)
@@ -1205,6 +1205,15 @@
 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)