Show
Ignore:
Timestamp:
12/27/03 19:51:37 (5 years ago)
Author:
miyoshi
Message:

Sync up with Meadow-2.00 Beta2-dev.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/international/meadow.el

    r3104 r3203  
    2222frame's display). 
    2323 
    24 This function is overrided by Meadow." 
     24This function is overridden by Meadow." 
    2525  (and (display-graphic-p display) 
    2626       (fboundp 'image-mask-p) 
     
    2828 
    2929;; BMP support 
    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)))))) 
    4544 
    4645;;; 
     
    5352;;; overwrite splash handling 
    5453;;; 
     54 
     55(defvar mw32-splash-masked-p nil 
     56  "If non-nil, show a splash screen of Meadow with a heuristic mask.") 
    5557 
    5658(defun use-fancy-splash-screens-p () 
     
    6769  (let* ((image-file (or fancy-splash-image 
    6870                         "meadow.bmp")) 
    69          (img (create-image image-file 'bmp)) 
     71         (img (create-image image-file 
     72                            (if (memq 'BMP image-types) 'BMP 'bmp) 
     73                            nil :heuristic-mask mw32-splash-masked-p)) 
    7074         (image-width (and img (car (image-size img)))) 
    7175         (window-width (window-width (selected-window)))) 
     
    7882        ;; Insert the image with a help-echo and a keymap. 
    7983        (let ((map (make-sparse-keymap)) 
    80               (help-echo "mouse-2: browse http://www.gnu.org/")) 
     84              (help-echo "mouse-2: browse http://www.meadowy.org/")) 
    8185          (define-key map [mouse-2] 
    8286            (lambda () 
    8387              (interactive) 
    84               (browse-url "http://www.gnu.org/") 
     88              (browse-url "http://www.meadowy.org/") 
    8589              (throw 'exit nil))) 
    8690          (define-key map [down-mouse-2] 'ignore) 
     
    99103  (insert "\n")) 
    100104 
     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"))) 
    101119 
    102120;;; 
     
    273291(defalias 'x-file-dialog 'mw32-file-dialog) 
    274292 
     293;;; Section: focus frame 
     294 
     295(defalias 'w32-focus-frame 'x-focus-frame) 
     296 
    275297;; 
    276298;; Section: Shell execute 
     
    546568(defun x-display-save-under (&optional display) nil) 
    547569 
    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  
    589570(provide 'meadow) 
    590571