diff lisp/modeline.el @ 284:558f606b08ae r21-0b40

Import from CVS: tag r21-0b40
author cvs
date Mon, 13 Aug 2007 10:34:13 +0200
parents 7df0dd720c89
children 57709be46d1b
line wrap: on
line diff
--- a/lisp/modeline.el	Mon Aug 13 10:33:19 2007 +0200
+++ b/lisp/modeline.el	Mon Aug 13 10:34:13 2007 +0200
@@ -257,9 +257,12 @@
 
 (make-face 'modeline-mousable "Face for mousable portions of the modeline.")
 (set-face-parent 'modeline-mousable 'modeline nil '(default))
+(when (featurep 'window-system)
+  (set-face-foreground 'modeline-mousable 
+		       '(((default color x) . "firebrick")
+			 ((default color mswindows) . "firebrick"))
+			 'global))
 (when (featurep 'x)
-  (set-face-foreground 'modeline-mousable "firebrick" 'global
-		       '(default color x))
   (set-face-font 'modeline-mousable [bold] nil '(default mono x))
   (set-face-font 'modeline-mousable [bold] nil '(default grayscale x)))
 
@@ -294,10 +297,13 @@
 	   "Face for mousable minor-mode strings in the modeline.")
 (set-face-parent 'modeline-mousable-minor-mode 'modeline-mousable nil
 		 '(default))
-(when (featurep 'x)
+(when (featurep 'window-system)
   (set-face-foreground 'modeline-mousable-minor-mode
 		       '(((default color x) . "green4")
-			 ((default color x) . "forestgreen")) 'global))
+			 ((default color x) . "forestgreen")
+			 ((default color mswindows) . "green4")
+			 ((default color mswindows) . "forestgreen")) 
+		       'global))
 
 (defvar modeline-mousable-minor-mode-extent (make-extent nil nil)
   ;; alliteration at its finest.
@@ -402,12 +408,14 @@
 		(lambda ()
 		  (interactive)
 		  (if defining-kbd-macro
-		      ;; #### 1 means to disregard the last event.
-		      ;; This is needed because the last recorded
-		      ;; event is usually the mouse event that invoked
-		      ;; the menu item (and this function), and having
-		      ;; it in the macro causes problems.
-		      (end-kbd-macro nil 1)
+		      (progn
+			;; #### This means to disregard the last event.
+			;; It is needed because the last recorded
+			;; event is usually the mouse event that
+			;; invoked the menu item (and this function),
+			;; and having it in the macro causes problems.
+			(zap-last-kbd-macro-event)
+			(end-kbd-macro nil))
 		    (start-kbd-macro nil))))
 
 (defun modeline-minor-mode-menu (event)
@@ -492,8 +500,11 @@
 (make-face 'modeline-buffer-id
 	   "Face for the buffer ID string in the modeline.")
 (set-face-parent 'modeline-buffer-id 'modeline nil '(default))
-(when (featurep 'x)
-  (set-face-foreground 'modeline-buffer-id "blue4" 'global '(default color x)))
+(when (featurep 'window-system)
+  (set-face-foreground 'modeline-buffer-id 
+		       '(((default color x) . "blue4")
+			 ((default color mswindows) . "blue4"))
+		       'global))
 (when (featurep 'x)
   (set-face-font 'modeline-buffer-id [bold-italic] nil '(default mono x))
   (set-face-font 'modeline-buffer-id [bold-italic] nil '(default grayscale x)))