comparison lisp/modeline.el @ 263:727739f917cb r20-5b30

Import from CVS: tag r20-5b30
author cvs
date Mon, 13 Aug 2007 10:24:41 +0200
parents 11cf20601dec
children 8efd647ea9ca
comparison
equal deleted inserted replaced
262:9d8607af9e13 263:727739f917cb
254 ;; button2 selects the window without setting point 254 ;; button2 selects the window without setting point
255 (define-key modeline-map 'button2 (lambda () (interactive "@"))) 255 (define-key modeline-map 'button2 (lambda () (interactive "@")))
256 (define-key modeline-map 'button3 'modeline-menu) 256 (define-key modeline-map 'button3 'modeline-menu)
257 257
258 (make-face 'modeline-mousable "Face for mousable portions of the modeline.") 258 (make-face 'modeline-mousable "Face for mousable portions of the modeline.")
259 (set-face-parent 'modeline-mousable 'modeline) 259 (set-face-parent 'modeline-mousable 'modeline nil '(default))
260 (when (featurep 'x) 260 (when (featurep 'x)
261 (set-face-foreground 'modeline-mousable "firebrick" 'global '(color x)) 261 (set-face-foreground 'modeline-mousable "firebrick" 'global
262 (set-face-font 'modeline-mousable [bold] nil '(mono x)) 262 '(default color x))
263 (set-face-font 'modeline-mousable [bold] nil '(grayscale x))) 263 (set-face-font 'modeline-mousable [bold] nil '(default mono x))
264 (set-face-font 'modeline-mousable [bold] nil '(default grayscale x)))
264 265
265 (defmacro make-modeline-command-wrapper (command) 266 (defmacro make-modeline-command-wrapper (command)
266 `#'(lambda (event) 267 `#'(lambda (event)
267 (interactive "e") 268 (interactive "e")
268 (save-selected-window 269 (save-selected-window
289 If two active keymaps bind the same key, the keymap appearing earlier 290 If two active keymaps bind the same key, the keymap appearing earlier
290 in the list takes precedence.") 291 in the list takes precedence.")
291 292
292 (make-face 'modeline-mousable-minor-mode 293 (make-face 'modeline-mousable-minor-mode
293 "Face for mousable minor-mode strings in the modeline.") 294 "Face for mousable minor-mode strings in the modeline.")
294 (set-face-parent 'modeline-mousable-minor-mode 'modeline-mousable) 295 (set-face-parent 'modeline-mousable-minor-mode 'modeline-mousable nil
296 '(default))
295 (when (featurep 'x) 297 (when (featurep 'x)
296 (set-face-foreground 'modeline-mousable-minor-mode 298 (set-face-foreground 'modeline-mousable-minor-mode
297 '(((color x) . "green4") 299 '(((default color x) . "green4")
298 ((color x) . "forestgreen")) 'global)) 300 ((default color x) . "forestgreen")) 'global))
299 301
300 (defvar modeline-mousable-minor-mode-extent (make-extent nil nil) 302 (defvar modeline-mousable-minor-mode-extent (make-extent nil nil)
301 ;; alliteration at its finest. 303 ;; alliteration at its finest.
302 "Extent managing the mousable minor mode modeline strings.") 304 "Extent managing the mousable minor mode modeline strings.")
303 (set-extent-face modeline-mousable-minor-mode-extent 305 (set-extent-face modeline-mousable-minor-mode-extent
501 (define-key modeline-buffer-id-left-map 'button3 'modeline-buffers-menu) 503 (define-key modeline-buffer-id-left-map 'button3 'modeline-buffers-menu)
502 (define-key modeline-buffer-id-right-map 'button3 'modeline-buffers-menu) 504 (define-key modeline-buffer-id-right-map 'button3 'modeline-buffers-menu)
503 505
504 (make-face 'modeline-buffer-id 506 (make-face 'modeline-buffer-id
505 "Face for the buffer ID string in the modeline.") 507 "Face for the buffer ID string in the modeline.")
506 (set-face-parent 'modeline-buffer-id 'modeline) 508 (set-face-parent 'modeline-buffer-id 'modeline nil '(default))
507 (when (featurep 'x) 509 (when (featurep 'x)
508 (set-face-foreground 'modeline-buffer-id "blue4" 'global '(color x))) 510 (set-face-foreground 'modeline-buffer-id "blue4" 'global '(default color x)))
509 (when (featurep 'x) 511 (when (featurep 'x)
510 (set-face-font 'modeline-buffer-id [bold-italic] nil '(mono x)) 512 (set-face-font 'modeline-buffer-id [bold-italic] nil '(default mono x))
511 (set-face-font 'modeline-buffer-id [bold-italic] nil '(grayscale x))) 513 (set-face-font 'modeline-buffer-id [bold-italic] nil '(default grayscale x)))
512 (when (featurep 'tty) 514 (when (featurep 'tty)
513 (set-face-font 'modeline-buffer-id [bold-italic] nil 'tty)) 515 (set-face-font 'modeline-buffer-id [bold-italic] nil '(default tty)))
514 516
515 (defvar modeline-buffer-id-extent (make-extent nil nil) 517 (defvar modeline-buffer-id-extent (make-extent nil nil)
516 "Extent covering the whole of the buffer-id string.") 518 "Extent covering the whole of the buffer-id string.")
517 (set-extent-face modeline-buffer-id-extent 'modeline-buffer-id) 519 (set-extent-face modeline-buffer-id-extent 'modeline-buffer-id)
518 520