404
|
1 ;;; winnt.el --- Lisp routines for MS Windows.
|
217
|
2
|
|
3 ;; Copyright (C) 1994 Free Software Foundation, Inc.
|
|
4
|
286
|
5 ;; Maintainer: XEmacs Development Team
|
|
6 ;; Keywords: mouse, dumped
|
217
|
7
|
286
|
8 ;; This file is part of XEmacs.
|
217
|
9
|
286
|
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
|
217
|
12 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
13 ;; any later version.
|
|
14
|
286
|
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.
|
217
|
19
|
|
20 ;; You should have received a copy of the GNU General Public License
|
286
|
21 ;; along with XEmacs; see the file COPYING. If not, write to the
|
|
22 ;; Free Software Foundation, 59 Temple Place - Suite 330,
|
217
|
23 ;; Boston, MA 02111-1307, USA.
|
|
24
|
286
|
25 ;;; Synched up with: Not synched with FSF. Almost completely divergent.
|
|
26
|
217
|
27 ;;; Commentary:
|
|
28
|
286
|
29 ;; This file is dumped with XEmacs for MS Windows (without cygwin).
|
217
|
30
|
286
|
31 ;; Based on NT Emacs version by Geoff Voelker (voelker@cs.washington.edu)
|
217
|
32 ;; Ported to XEmacs by Marc Paquette <marcpa@cam.org>
|
286
|
33 ;; Largely modified by Kirill M. Katsnelson <kkm@kis.ru>
|
217
|
34
|
|
35 ;;; Code:
|
|
36
|
|
37 ;; The cmd.exe shell uses the "/c" switch instead of the "-c" switch
|
|
38 ;; for executing its command line argument (from simple.el).
|
286
|
39 ;; #### Oh if we had an alist of shells and their command switches.
|
217
|
40 (setq shell-command-switch "/c")
|
|
41
|
398
|
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.
|
|
45
|
|
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)
|
371
|
50
|
217
|
51 ;; Use ";" instead of ":" as a path separator (from files.el).
|
|
52 (setq path-separator ";")
|
|
53
|
|
54 ;; Set the null device (for compile.el).
|
286
|
55 ;; #### There should be such a global thingy as null-device - kkm
|
217
|
56 (setq grep-null-device "NUL")
|
|
57
|
|
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)))
|
|
61
|
286
|
62 ;;----------------------------------------------------------------------
|
|
63 ;; Autosave hack
|
|
64 ;;--------------------
|
217
|
65
|
286
|
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."
|
|
71 )
|
217
|
72 (fset 'original-make-auto-save-file-name
|
|
73 (symbol-function 'make-auto-save-file-name))
|
|
74
|
|
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))
|
|
81 (start 0))
|
380
|
82 ;; destructively replace occurrences of * or ? with $
|
217
|
83 (while (string-match "[?*]" name start)
|
|
84 (aset name (match-beginning 0) ?$)
|
|
85 (setq start (1+ (match-end 0))))
|
|
86 name))
|
|
87
|
|
88 ;;; winnt.el ends here
|