| 30 | | (let (image-type) |
|---|
| 31 | | (setq image-type |
|---|
| 32 | | (cond ((memq 'bmp image-types) 'bmp) ; ImageMagick image decoder |
|---|
| 33 | | ((memq 'BMP image-types) 'BMP))) ; built-in image decoder |
|---|
| 34 | | (when image-type |
|---|
| 35 | | (require 'image) |
|---|
| 36 | | (require 'image-file) |
|---|
| 37 | | |
|---|
| 38 | | (or (rassq 'bmp image-type-regexps) |
|---|
| 39 | | (setq image-type-regexps |
|---|
| 40 | | (cons (cons "\\`BM" image-type) image-type-regexps))) |
|---|
| 41 | | |
|---|
| 42 | | (or (member "bmp" image-file-name-extensions) |
|---|
| 43 | | (setq image-file-name-extensions |
|---|
| 44 | | (cons "bmp" image-file-name-extensions))))) |
|---|
| | 30 | (add-hook 'before-init-hook |
|---|
| | 31 | (lambda () |
|---|
| | 32 | (let ((image-type (if (memq 'BMP image-types) |
|---|
| | 33 | 'BMP ; ImageMagick image decoder |
|---|
| | 34 | 'bmp))) ; built-in image decoder |
|---|
| | 35 | (require 'image) |
|---|
| | 36 | (require 'image-file) |
|---|
| | 37 | |
|---|
| | 38 | (or (rassq image-type image-type-regexps) |
|---|
| | 39 | (setq image-type-regexps |
|---|
| | 40 | (cons (cons "\\`BM" image-type) image-type-regexps))) |
|---|
| | 41 | (or (member "bmp" image-file-name-extensions) |
|---|
| | 42 | (setq image-file-name-extensions |
|---|
| | 43 | (cons "bmp" image-file-name-extensions)))))) |
|---|
| | 105 | (defun fancy-splash-tail () |
|---|
| | 106 | "Insert the tail part of the splash screen into the current buffer." |
|---|
| | 107 | (let ((fg (if (eq (frame-parameter nil 'background-mode) 'dark) |
|---|
| | 108 | "cyan" "darkblue"))) |
|---|
| | 109 | (fancy-splash-insert :face `(variable-pitch :foreground ,fg) |
|---|
| | 110 | "\nThis is " |
|---|
| | 111 | (Meadow-version) |
|---|
| | 112 | "\n based on " |
|---|
| | 113 | (emacs-version) |
|---|
| | 114 | "\n" |
|---|
| | 115 | :face '(variable-pitch :height 0.5) |
|---|
| | 116 | "Copyright (C) 2001 Free Software Foundation, Inc.\n" |
|---|
| | 117 | "Copyright (C) 1995-2001 MIYASHITA Hisashi\n" |
|---|
| | 118 | "Copyright (C) 2002, 2003 The Meadow Team"))) |
|---|
| 548 | | ;;; |
|---|
| 549 | | ;;; cache for enumerated logfonts |
|---|
| 550 | | ;;; |
|---|
| 551 | | (defvar w32-enum-logfont-cache-file |
|---|
| 552 | | nil |
|---|
| 553 | | ;; "~/.w32_enum_logfont_cache" |
|---|
| 554 | | "*The cache file that contains enumerated logfonts, if it is non-nil.") |
|---|
| 555 | | |
|---|
| 556 | | (defvar w32-enum-logfont-cache nil |
|---|
| 557 | | "*The cache variable that contains enumerated logfonts.") |
|---|
| 558 | | |
|---|
| 559 | | (unless (fboundp 'w32-enum-logfont-original) |
|---|
| 560 | | (fset 'w32-enum-logfont-original (symbol-function 'w32-enum-logfont)) |
|---|
| 561 | | (defun w32-enum-logfont (&optional family device) |
|---|
| 562 | | (if (or family device) |
|---|
| 563 | | (w32-enum-logfont-original family device) |
|---|
| 564 | | (if w32-enum-logfont-cache |
|---|
| 565 | | w32-enum-logfont-cache |
|---|
| 566 | | (if (null w32-enum-logfont-cache-file) |
|---|
| 567 | | (setq w32-enum-logfont-cache |
|---|
| 568 | | (w32-enum-logfont-original family device)) |
|---|
| 569 | | (setq w32-enum-logfont-cache-file |
|---|
| 570 | | (expand-file-name w32-enum-logfont-cache-file)) |
|---|
| 571 | | (when (file-exists-p w32-enum-logfont-cache-file) |
|---|
| 572 | | (with-temp-buffer |
|---|
| 573 | | (let ((coding-system-for-read 'iso-2022-7bit)) |
|---|
| 574 | | (insert-file-contents w32-enum-logfont-cache-file)) |
|---|
| 575 | | (condition-case nil |
|---|
| 576 | | (setq w32-enum-logfont-cache |
|---|
| 577 | | (read (current-buffer))) |
|---|
| 578 | | (error nil))))) |
|---|
| 579 | | (when (null w32-enum-logfont-cache) |
|---|
| 580 | | (setq w32-enum-logfont-cache |
|---|
| 581 | | (w32-enum-logfont-original family device)) |
|---|
| 582 | | (with-temp-buffer |
|---|
| 583 | | (let ((coding-system-for-write 'iso-2022-7bit) |
|---|
| 584 | | print-level print-length) |
|---|
| 585 | | (prin1 w32-enum-logfont-cache (current-buffer)) |
|---|
| 586 | | (write-file w32-enum-logfont-cache-file)))) |
|---|
| 587 | | w32-enum-logfont-cache)))) |
|---|
| 588 | | |
|---|