changeset 63769:cae70b5066ae

(facemenu-enable-faces-p): New function. (facemenu-background-menu, facemenu-foreground-menu) (facemenu-face-menu): Add menu-enable property.
author Richard M. Stallman <rms@gnu.org>
date Sat, 25 Jun 2005 22:24:10 +0000
parents 79a2185587dc
children 3a3ce81d27d0
files lisp/facemenu.el
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/facemenu.el	Sat Jun 25 14:38:05 2005 +0000
+++ b/lisp/facemenu.el	Sat Jun 25 22:24:10 2005 +0000
@@ -162,6 +162,7 @@
   "Menu keymap for faces.")
 ;;;###autoload
 (defalias 'facemenu-face-menu facemenu-face-menu)
+(put 'facemenu-face-menu 'menu-enable '(facemenu-enable-faces-p))
 
 ;;;###autoload
 (defvar facemenu-foreground-menu
@@ -171,6 +172,7 @@
   "Menu keymap for foreground colors.")
 ;;;###autoload
 (defalias 'facemenu-foreground-menu facemenu-foreground-menu)
+(put 'facemenu-foreground-menu 'menu-enable '(facemenu-enable-faces-p))
 
 ;;;###autoload
 (defvar facemenu-background-menu
@@ -180,6 +182,11 @@
   "Menu keymap for background colors.")
 ;;;###autoload
 (defalias 'facemenu-background-menu facemenu-background-menu)
+(put 'facemenu-background-menu 'menu-enable '(facemenu-enable-faces-p))
+
+;;; Condition for enabling menu items that set faces.
+(defun facemenu-enable-faces-p ()
+  (not (and font-lock-mode font-lock-defaults)))
 
 ;;;###autoload
 (defvar facemenu-special-menu