]> code.delx.au - gnu-emacs/blobdiff - lisp/term/w32-win.el
Merge from emacs--rel--22
[gnu-emacs] / lisp / term / w32-win.el
index e2b88086eac52dbadd2356dc807f3bf2fa58f057..fd5ccc0aceeb5323ec91495bad723bbafcd8dec8 100644 (file)
@@ -1,7 +1,7 @@
 ;;; w32-win.el --- parse switches controlling interface with W32 window system
 
 ;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007 Free Software Foundation, Inc.
+;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 ;; Author: Kevin Gallo
 ;; Keywords: terminals
 (require 'menu-bar)
 (require 'dnd)
 (require 'code-pages)
+(require 'w32-vars)
+
+;; Keep an obsolete alias for w32-focus-frame in case it is used by code
+;; outside Emacs.
+(define-obsolete-function-alias 'w32-focus-frame 'x-focus-frame "23.1")
 
 (defvar xlfd-regexp-registry-subnum)
+(defvar w32-color-map) ;; defined in w32fns.c
+
+(declare-function w32-send-sys-command "w32fns.c")
+(declare-function w32-select-font "w32fns.c")
+(declare-function set-message-beep "w32console.c")
 
 ;; Conditional on new-fontset so bootstrapping works on non-GUI compiles
 (if (fboundp 'new-fontset)
@@ -108,7 +118,7 @@ Switch to a buffer editing the last file dropped."
           (y (cdr coords)))
       (if (and (> x 0) (> y 0))
          (set-frame-selected-window nil window))
-      (mapcar (lambda (file-name)
+      (mapc (lambda (file-name)
                (let ((f (subst-char-in-string ?\\ ?/ file-name))
                      (coding (or file-name-coding-system
                                  default-file-name-coding-system)))
@@ -1048,17 +1058,6 @@ XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp")
  If FRAME is nil or not given, use the selected frame."
    (interactive "i")
    (w32-send-sys-command ?\xf100 frame))
-
-(defun x-setup-function-keys (frame)
-  "Setup Function Keys for w32."
-  (with-selected-frame frame
-     (define-key local-function-key-map [f10] 'menu-bar-open)
-
-     (substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame
-                                local-function-key-map global-map)
-
-     (define-key local-function-key-map [S-tab] [backtab]))
-  (set-terminal-parameter frame 'x-setup-function-keys t))
 \f
 
 ;; W32 systems have different fonts than commonly found on X, so
@@ -1077,12 +1076,6 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.")
   (error "Suspending an Emacs running under W32 makes no sense"))
 
 
-;;; Enable Japanese fonts on Windows to be used by default.
-(set-fontset-font nil (make-char 'katakana-jisx0201) '("*" . "JISX0208-SJIS"))
-(set-fontset-font nil (make-char 'latin-jisx0201) '("*" . "JISX0208-SJIS"))
-(set-fontset-font nil (make-char 'japanese-jisx0208) '("*" . "JISX0208-SJIS"))
-(set-fontset-font nil (make-char 'japanese-jisx0208-1978) '("*" . "JISX0208-SJIS"))
-
 (defun mouse-set-font (&rest fonts)
   "Select an Emacs font from a list of known good fonts and fontsets.
 
@@ -1118,11 +1111,14 @@ pop-up menu are unaffected by `w32-list-proportional-fonts')."
 
 ;;; Set default known names for image libraries
 (setq image-library-alist
-      '((xpm "xpm4.dll" "libXpm-nox4.dll" "libxpm.dll")
+      '((xpm "libxpm.dll" "xpm4.dll" "libXpm-nox4.dll")
         (png "libpng13d.dll" "libpng13.dll" "libpng12d.dll" "libpng12.dll" "libpng.dll")
         (jpeg "jpeg62.dll" "libjpeg.dll" "jpeg-62.dll" "jpeg.dll")
         (tiff "libtiff3.dll" "libtiff.dll")
-        (gif "giflib4.dll" "libungif4.dll" "libungif.dll")))
+        (gif "giflib4.dll" "libungif4.dll" "libungif.dll")
+        (svg "librsvg-2-2.dll")
+        (gdk-pixbuf "libgdk_pixbuf-2.0-0.dll")
+        (glib "libglib-2.0-0.dll")))
 
 ;;; multi-tty support
 (defvar w32-initialized nil
@@ -1150,6 +1146,17 @@ pop-up menu are unaffected by `w32-list-proportional-fonts')."
 
   ;; Setup the default fontset.
   (setup-default-fontset)
+
+  ;; Enable Japanese fonts on Windows to be used by default.
+  (set-fontset-font nil (make-char 'katakana-jisx0201)
+                   '("*" . "JISX0208-SJIS"))
+  (set-fontset-font nil (make-char 'latin-jisx0201)
+                   '("*" . "JISX0208-SJIS"))
+  (set-fontset-font nil (make-char 'japanese-jisx0208)
+                   '("*" . "JISX0208-SJIS"))
+  (set-fontset-font nil (make-char 'japanese-jisx0208-1978)
+                   '("*" . "JISX0208-SJIS"))
+
   ;; Create the standard fontset.
   (create-fontset-from-fontset-spec w32-standard-fontset-spec t)
   ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1,...).