Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
283:fa3d41851a08 | 284:558f606b08ae |
---|---|
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 nil '(default)) | 259 (set-face-parent 'modeline-mousable 'modeline nil '(default)) |
260 (when (featurep 'window-system) | |
261 (set-face-foreground 'modeline-mousable | |
262 '(((default color x) . "firebrick") | |
263 ((default color mswindows) . "firebrick")) | |
264 'global)) | |
260 (when (featurep 'x) | 265 (when (featurep 'x) |
261 (set-face-foreground 'modeline-mousable "firebrick" 'global | |
262 '(default color x)) | |
263 (set-face-font 'modeline-mousable [bold] nil '(default mono x)) | 266 (set-face-font 'modeline-mousable [bold] nil '(default mono x)) |
264 (set-face-font 'modeline-mousable [bold] nil '(default grayscale x))) | 267 (set-face-font 'modeline-mousable [bold] nil '(default grayscale x))) |
265 | 268 |
266 (defmacro make-modeline-command-wrapper (command) | 269 (defmacro make-modeline-command-wrapper (command) |
267 `#'(lambda (event) | 270 `#'(lambda (event) |
292 | 295 |
293 (make-face 'modeline-mousable-minor-mode | 296 (make-face 'modeline-mousable-minor-mode |
294 "Face for mousable minor-mode strings in the modeline.") | 297 "Face for mousable minor-mode strings in the modeline.") |
295 (set-face-parent 'modeline-mousable-minor-mode 'modeline-mousable nil | 298 (set-face-parent 'modeline-mousable-minor-mode 'modeline-mousable nil |
296 '(default)) | 299 '(default)) |
297 (when (featurep 'x) | 300 (when (featurep 'window-system) |
298 (set-face-foreground 'modeline-mousable-minor-mode | 301 (set-face-foreground 'modeline-mousable-minor-mode |
299 '(((default color x) . "green4") | 302 '(((default color x) . "green4") |
300 ((default color x) . "forestgreen")) 'global)) | 303 ((default color x) . "forestgreen") |
304 ((default color mswindows) . "green4") | |
305 ((default color mswindows) . "forestgreen")) | |
306 'global)) | |
301 | 307 |
302 (defvar modeline-mousable-minor-mode-extent (make-extent nil nil) | 308 (defvar modeline-mousable-minor-mode-extent (make-extent nil nil) |
303 ;; alliteration at its finest. | 309 ;; alliteration at its finest. |
304 "Extent managing the mousable minor mode modeline strings.") | 310 "Extent managing the mousable minor mode modeline strings.") |
305 (set-extent-face modeline-mousable-minor-mode-extent | 311 (set-extent-face modeline-mousable-minor-mode-extent |
400 (put 'defining-kbd-macro :menu-tag "Keyboard Macro") | 406 (put 'defining-kbd-macro :menu-tag "Keyboard Macro") |
401 (add-minor-mode 'defining-kbd-macro " Def" nil nil | 407 (add-minor-mode 'defining-kbd-macro " Def" nil nil |
402 (lambda () | 408 (lambda () |
403 (interactive) | 409 (interactive) |
404 (if defining-kbd-macro | 410 (if defining-kbd-macro |
405 ;; #### 1 means to disregard the last event. | 411 (progn |
406 ;; This is needed because the last recorded | 412 ;; #### This means to disregard the last event. |
407 ;; event is usually the mouse event that invoked | 413 ;; It is needed because the last recorded |
408 ;; the menu item (and this function), and having | 414 ;; event is usually the mouse event that |
409 ;; it in the macro causes problems. | 415 ;; invoked the menu item (and this function), |
410 (end-kbd-macro nil 1) | 416 ;; and having it in the macro causes problems. |
417 (zap-last-kbd-macro-event) | |
418 (end-kbd-macro nil)) | |
411 (start-kbd-macro nil)))) | 419 (start-kbd-macro nil)))) |
412 | 420 |
413 (defun modeline-minor-mode-menu (event) | 421 (defun modeline-minor-mode-menu (event) |
414 "The menu that pops up when you press `button3' inside the | 422 "The menu that pops up when you press `button3' inside the |
415 parentheses on the modeline." | 423 parentheses on the modeline." |
490 (define-key modeline-buffer-id-right-map 'button3 'modeline-buffers-menu) | 498 (define-key modeline-buffer-id-right-map 'button3 'modeline-buffers-menu) |
491 | 499 |
492 (make-face 'modeline-buffer-id | 500 (make-face 'modeline-buffer-id |
493 "Face for the buffer ID string in the modeline.") | 501 "Face for the buffer ID string in the modeline.") |
494 (set-face-parent 'modeline-buffer-id 'modeline nil '(default)) | 502 (set-face-parent 'modeline-buffer-id 'modeline nil '(default)) |
495 (when (featurep 'x) | 503 (when (featurep 'window-system) |
496 (set-face-foreground 'modeline-buffer-id "blue4" 'global '(default color x))) | 504 (set-face-foreground 'modeline-buffer-id |
505 '(((default color x) . "blue4") | |
506 ((default color mswindows) . "blue4")) | |
507 'global)) | |
497 (when (featurep 'x) | 508 (when (featurep 'x) |
498 (set-face-font 'modeline-buffer-id [bold-italic] nil '(default mono x)) | 509 (set-face-font 'modeline-buffer-id [bold-italic] nil '(default mono x)) |
499 (set-face-font 'modeline-buffer-id [bold-italic] nil '(default grayscale x))) | 510 (set-face-font 'modeline-buffer-id [bold-italic] nil '(default grayscale x))) |
500 (when (featurep 'tty) | 511 (when (featurep 'tty) |
501 (set-face-font 'modeline-buffer-id [bold-italic] nil '(default tty))) | 512 (set-face-font 'modeline-buffer-id [bold-italic] nil '(default tty))) |