X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/59c414b1d0a01acff2bdc5e8ee6b76b0ee5aac3d..058e8562775571790e48b1614e84a9617a9e1e17:/lisp/w32-fns.el diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el index 876df875b1..3c524e76d4 100644 --- a/lisp/w32-fns.el +++ b/lisp/w32-fns.el @@ -1,6 +1,6 @@ ;;; w32-fns.el --- Lisp routines for 32-bit Windows -;; Copyright (C) 1994, 2001-2015 Free Software Foundation, Inc. +;; Copyright (C) 1994, 2001-2016 Free Software Foundation, Inc. ;; Author: Geoff Voelker ;; Keywords: internal @@ -31,9 +31,9 @@ ;;;; Function keys -(declare-function set-message-beep "w32fns.c") -(declare-function w32-get-locale-info "w32proc.c") -(declare-function w32-get-valid-locale-ids "w32proc.c") +(declare-function set-message-beep "w32fns.c" (sound)) +(declare-function w32-get-locale-info "w32proc.c" (lcid &optional longform)) +(declare-function w32-get-valid-locale-ids "w32proc.c" ()) ;; Map all versions of a filename (8.3, longname, mixed case) to the ;; same buffer. @@ -44,7 +44,7 @@ (or (bound-and-true-p shell-file-name) (getenv "ESHELL") (getenv "SHELL") - (and (w32-using-nt) "cmd.exe") + (and (fboundp 'w32-using-nt) (w32-using-nt) "cmd.exe") "command.com")) (defun w32-system-shell-p (shell-name) @@ -121,7 +121,7 @@ You should set this to t when using a non-system shell.\n\n")))) (add-hook 'after-init-hook 'w32-check-shell-configuration) ;; Override setting chosen at startup. -(defun set-default-process-coding-system () +(defun w32-set-default-process-coding-system () ;; Most programs on Windows will accept Unix line endings on input ;; (and some programs ported from Unix require it) but most will ;; produce DOS line endings on output. @@ -142,8 +142,9 @@ You should set this to t when using a non-system shell.\n\n")))) . ,(if (default-value 'enable-multibyte-characters) '(undecided-dos . undecided-dos) '(raw-text-dos . raw-text-dos))))) - -(add-hook 'before-init-hook 'set-default-process-coding-system) +(define-obsolete-function-alias 'set-default-process-coding-system + #'w32-set-default-process-coding-system "25.2") +(add-hook 'before-init-hook #'w32-set-default-process-coding-system) ;;; Basic support functions for managing Emacs's locale setting @@ -200,8 +201,7 @@ certain patterns. This function is called by `convert-standard-filename'. Replace invalid characters and turn Cygwin names into native -names, and also turn slashes into backslashes if the shell -requires it (see `w32-shell-dos-semantics')." +names." (save-match-data (let ((name (if (string-match "\\`/cygdrive/\\([a-zA-Z]\\)/" filename) @@ -216,16 +216,9 @@ requires it (see `w32-shell-dos-semantics')." (while (string-match "[?*:<>|\"\000-\037]" name start) (aset name (match-beginning 0) ?!) (setq start (match-end 0))) - ;; convert directory separators to Windows format - ;; (but only if the shell in use requires it) - (when (w32-shell-dos-semantics) - (setq start 0) - (while (string-match "/" name start) - (aset name (match-beginning 0) ?\\) - (setq start (match-end 0)))) name))) -(defun set-w32-system-coding-system (coding-system) +(defun w32-set-system-coding-system (coding-system) "Set the coding system used by the Windows system to CODING-SYSTEM. This is used for things like passing font names with non-ASCII characters in them to the system. For a list of possible values of @@ -241,6 +234,8 @@ This function is provided for backward compatibility, since default)))) (check-coding-system coding-system) (setq locale-coding-system coding-system)) +(define-obsolete-function-alias 'set-w32-system-coding-system + #'w32-set-system-coding-system "25.2") ;; locale-coding-system was introduced to do the same thing as ;; w32-system-coding-system. Use that instead.