X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/e6fd457e010c2ec034a331335530d817852cc11c..659a9010460fe97b52b45cd61c09c015827091d2:/lisp/dos-w32.el?ds=sidebyside diff --git a/lisp/dos-w32.el b/lisp/dos-w32.el index 071c7b7126..5866edfc3d 100644 --- a/lisp/dos-w32.el +++ b/lisp/dos-w32.el @@ -1,6 +1,6 @@ ;; dos-w32.el --- Functions shared among MS-DOS and W32 (NT/95) platforms -;; Copyright (C) 1996, 2001-2012 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001-2013 Free Software Foundation, Inc. ;; Maintainer: Geoff Voelker ;; Keywords: internal @@ -38,9 +38,8 @@ (setq null-device "NUL") ;; For distinguishing file types based upon suffixes. -(defvar file-name-buffer-file-type-alist - '( - ("[:/].*config.sys$" . nil) ; config.sys text +(defcustom file-name-buffer-file-type-alist + '(("[:/].*config.sys$" . nil) ; config.sys text ("\\.\\(obj\\|exe\\|com\\|lib\\|sys\\|bin\\|ico\\|pif\\|class\\)$" . t) ; MS-Dos stuff ("\\.\\(dll\\|drv\\|386\\|vxd\\|fon\\|fnt\\|fot\\|ttf\\|grp\\)$" . t) @@ -57,7 +56,10 @@ ) "Alist for distinguishing text files from binary files. Each element has the form (REGEXP . TYPE), where REGEXP is matched -against the file name, and TYPE is nil for text, t for binary.") +against the file name, and TYPE is nil for text, t for binary." + :type '(repeat (cons regexp boolean)) + :group 'dos-fns + :group 'w32) ;; Return the pair matching filename on file-name-buffer-file-type-alist, ;; or nil otherwise. @@ -208,7 +210,7 @@ set to the appropriate coding system, and the value of (untranslated-file-p (buffer-file-name)))) (setq coding (coding-system-change-eol-conversion coding 0)) (setq buffer-file-coding-system coding)) - (setq buffer-file-type (eq buffer-file-coding-system 'no-conversion))))) + nil))) ;;; To set the default coding system on new files. (add-hook 'find-file-not-found-functions @@ -282,8 +284,11 @@ filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"." ;;; Support for printing under DOS/Windows, see lpr.el and ps-print.el. -(defvar direct-print-region-use-command-dot-com t - "Control whether command.com is used to print on Windows 9x.") +(defcustom direct-print-region-use-command-dot-com t + "If non-nil, use command.com to print on Windows 9x." + :type 'boolean + :group 'dos-fns + :group 'w32) ;; Function to actually send data to the printer port. ;; Supports writing directly, and using various programs. @@ -356,7 +361,7 @@ filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"." (apply 'call-process lpr-prog nil errbuf nil rest)) ;; Run command.com to access printer port on Windows 9x, unless ;; we are supposed to append to an existing (non-empty) file, - ;; to work around a bug in Windows 9x that prevents Win32 + ;; to work around a bug in Windows 9x that prevents Windows ;; programs from accessing LPT ports reliably. ((and (eq system-type 'windows-nt) (getenv "winbootdir")