Merge from emacs--devo--0
[bpt/emacs.git] / lisp / w32-fns.el
index 85b4be7..4a8947f 100644 (file)
@@ -1,7 +1,7 @@
 ;;; w32-fns.el --- Lisp routines for Windows NT
 
 ;; Copyright (C) 1994, 2001, 2002, 2003, 2004,
-;;   2005, 2006 Free Software Foundation, Inc.
+;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: Geoff Voelker <voelker@cs.washington.edu>
 ;; Keywords: internal
@@ -10,7 +10,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -57,7 +57,7 @@ numbers, and the build number."
   (x-server-version))
 
 (defun w32-using-nt ()
-  "Return non-nil if running on a 32-bit Windows system.
+  "Return non-nil if running on a Windows NT descendant.
 That includes all Windows systems except for 9X/Me."
   (and (eq system-type 'windows-nt) (getenv "SystemRoot")))
 
@@ -149,14 +149,19 @@ You should set this to t when using a non-system shell.\n\n"))))
        (if default-enable-multibyte-characters
            '(undecided-dos . undecided-unix)
          '(raw-text-dos . raw-text-unix)))
-  (or (w32-using-nt)
-      ;; On Windows 9x, make cmdproxy default to using DOS line endings
-      ;; for input, because command.com requires this.
-      (setq process-coding-system-alist
-           `(("[cC][mM][dD][pP][rR][oO][xX][yY]"
-              . ,(if default-enable-multibyte-characters
-                     '(undecided-dos . undecided-dos)
-                   '(raw-text-dos . raw-text-dos)))))))
+  ;; Make cmdproxy default to using DOS line endings for input,
+  ;; because some Windows programs (including command.com) require it.
+  (add-to-list 'process-coding-system-alist
+              `("[cC][mM][dD][pP][rR][oO][xX][yY]"
+                . ,(if default-enable-multibyte-characters
+                       '(undecided-dos . undecided-dos)
+                     '(raw-text-dos . raw-text-dos))))
+  ;; plink needs DOS input when entering the password.
+  (add-to-list 'process-coding-system-alist
+              `("[pP][lL][iI][nN][kK]"
+                . ,(if default-enable-multibyte-characters
+                       '(undecided-dos . undecided-dos)
+                     '(raw-text-dos . raw-text-dos)))))
 
 (add-hook 'before-init-hook 'set-default-process-coding-system)