1 ;;; winnt.el --- Lisp routines for MS Windows.
3 ;; Copyright (C) 1994 Free Software Foundation, Inc.
5 ;; Maintainer: XEmacs Development Team
6 ;; Keywords: mouse, dumped
8 ;; This file is part of XEmacs.
10 ;; XEmacs is free software; you can redistribute it and/or modify it
11 ;; under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; XEmacs is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;; General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with XEmacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
25 ;;; Synched up with: Not synched with FSF. Almost completely divergent.
29 ;; This file is dumped with XEmacs for MS Windows (without cygwin).
31 ;; Based on NT Emacs version by Geoff Voelker (voelker@cs.washington.edu)
32 ;; Ported to XEmacs by Marc Paquette <marcpa@cam.org>
33 ;; Largely modified by Kirill M. Katsnelson <kkm@kis.ru>
37 ;; The cmd.exe shell uses the "/c" switch instead of the "-c" switch
38 ;; for executing its command line argument (from simple.el).
39 ;; #### Oh if we had an alist of shells and their command switches.
40 (setq shell-command-switch "/c")
42 ;; For appending suffixes to directories and files in shell
43 ;; completions. This screws up cygwin users so we leave it out for
44 ;; now. Uncomment this if you only ever want to use cmd.
46 ;(defun nt-shell-mode-hook ()
47 ; (setq comint-completion-addsuffix '("\\" . " ")
48 ; comint-process-echoes t))
49 ;(add-hook 'shell-mode-hook 'nt-shell-mode-hook)
51 ;; Use ";" instead of ":" as a path separator (from files.el).
52 (setq path-separator ";")
54 ;; Set the null device (for compile.el).
55 ;; #### There should be such a global thingy as null-device - kkm
56 (setq grep-null-device "NUL")
58 ;; Set the grep regexp to match entries with drive letters.
59 (setq grep-regexp-alist
60 '(("^\\(\\([a-zA-Z]:\\)?[^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 3)))
62 ;;----------------------------------------------------------------------
64 ;;--------------------
66 ;; Avoid creating auto-save file names containing invalid characters
67 ;; (primarily "*", eg. for the *mail* buffer).
68 ;; Avoid "doc lost for function" warning
69 (defun original-make-auto-save-file-name (&optional junk)
70 "You do not want to call this."
72 (fset 'original-make-auto-save-file-name
73 (symbol-function 'make-auto-save-file-name))
75 (defun make-auto-save-file-name ()
76 "Return file name to use for auto-saves of current buffer.
77 Does not consider `auto-save-visited-file-name' as that variable is checked
78 before calling this function. You can redefine this for customization.
79 See also `auto-save-file-name-p'."
80 (let ((name (original-make-auto-save-file-name))
82 ;; destructively replace occurrences of * or ? with $
83 (while (string-match "[?*]" name start)
84 (aset name (match-beginning 0) ?$)
85 (setq start (1+ (match-end 0))))
88 ;;; winnt.el ends here