Mercurial > emacs
annotate lisp/w32-fns.el @ 15299:8ff4f4e1b487
(change-log-font-lock-keywords): Require colon after
parenthesized function name.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 28 May 1996 15:46:49 +0000 |
parents | 25dbb4494147 |
children | b0d95c32f026 |
rev | line source |
---|---|
15003 | 1 ;;; winnt.el --- Lisp routines for Windows NT. |
14169 | 2 |
9803 | 3 ;; Copyright (C) 1994 Free Software Foundation, Inc. |
4 | |
5 ;; Author: Geoff Voelker (voelker@cs.washington.edu) | |
6 | |
7 ;; This file is part of GNU Emacs. | |
8 | |
9 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
10 ;; it under the terms of the GNU General Public License as published by | |
11 ;; the Free Software Foundation; either version 2, or (at your option) | |
12 ;; any later version. | |
13 | |
14 ;; GNU Emacs is distributed in the hope that it will be useful, | |
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 ;; GNU General Public License for more details. | |
18 | |
19 ;; You should have received a copy of the GNU General Public License | |
14169 | 20 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
22 ;; Boston, MA 02111-1307, USA. | |
9803 | 23 |
24 ;;; Commentary: | |
25 | |
26 ;; (August 12, 1993) | |
11399 | 27 ;; Created. |
9803 | 28 |
11399 | 29 ;; (November 21, 1994) |
30 ;; [C-M-backspace] defined. | |
31 ;; mode-line-format defined to show buffer file type. | |
32 ;; audio bell initialized. | |
9803 | 33 |
34 ;;; Code: | |
35 | |
36 ;; Map delete and backspace | |
37 (define-key function-key-map [backspace] "\177") | |
38 (define-key function-key-map [delete] "\C-d") | |
39 (define-key function-key-map [M-backspace] [?\M-\177]) | |
11399 | 40 (define-key function-key-map [C-M-backspace] [\C-\M-delete]) |
41 | |
15257
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
42 ;; Show file type (text or binary) on modeline |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
43 (setq-default mode-line-format |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
44 (list (purecopy "") |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
45 'mode-line-modified |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
46 'mode-line-buffer-identification |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
47 (purecopy " ") |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
48 'global-mode-string |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
49 (purecopy " %[(") |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
50 (purecopy "%t:") |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
51 'mode-name 'mode-line-process 'minor-mode-alist |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
52 (purecopy "%n") |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
53 (purecopy ")%]--") |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
54 (purecopy '(line-number-mode "L%l--")) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
55 (purecopy '(column-number-mode "C%c--")) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
56 (purecopy '(-3 . "%p")) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
57 (purecopy "-%-"))) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
58 |
9803 | 59 ;; Ignore case on file-name completion |
60 (setq completion-ignore-case t) | |
61 | |
62 ;; The cmd.exe shell uses the "/c" switch instead of the "-c" switch | |
63 ;; for executing its command line argument (from simple.el). | |
64 (setq shell-command-switch "/c") | |
65 | |
15257
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
66 ;; Use ";" instead of ":" as a path separator (from files.el). |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
67 (setq path-separator ";") |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
68 |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
69 ;; Set the null device (for compile.el). |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
70 (setq grep-null-device "NUL") |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
71 |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
72 ;; Set the grep regexp to match entries with drive letters. |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
73 (setq grep-regexp-alist |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
74 '(("^\\(\\([a-zA-Z]:\\)?[^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 3))) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
75 |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
76 ;; Taken from dos-fn.el ... don't want all that's in the file, maybe |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
77 ;; separate it out someday. |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
78 |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
79 (defvar file-name-buffer-file-type-alist |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
80 '( |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
81 ("[:/].*config.sys$" . nil) ; config.sys text |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
82 ("\\.elc$" . t) ; emacs stuff |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
83 ("\\.\\(obj\\|exe\\|com\\|lib\\|sys\\|chk\\|out\\|bin\\|ico\\|pif\\)$" . t) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
84 ; MS-Dos stuff |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
85 ("\\.\\(arc\\|zip\\|pak\\|lzh\\|zoo\\)$" . t) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
86 ; Packers |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
87 ("\\.\\(a\\|o\\|tar\\|z\\|gz\\|taz\\)$" . t) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
88 ; Unix stuff |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
89 ("\\.tp[ulpw]$" . t) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
90 ; Borland Pascal stuff |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
91 ("[:/]tags$" . t) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
92 ; Emacs TAGS file |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
93 ) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
94 "*Alist for distinguishing text files from binary files. |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
95 Each element has the form (REGEXP . TYPE), where REGEXP is matched |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
96 against the file name, and TYPE is nil for text, t for binary.") |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
97 |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
98 (defun find-buffer-file-type (filename) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
99 (let ((alist file-name-buffer-file-type-alist) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
100 (found nil) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
101 (code nil)) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
102 (let ((case-fold-search t)) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
103 (setq filename (file-name-sans-versions filename)) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
104 (while (and (not found) alist) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
105 (if (string-match (car (car alist)) filename) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
106 (setq code (cdr (car alist)) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
107 found t)) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
108 (setq alist (cdr alist)))) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
109 (if found |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
110 (cond((memq code '(nil t)) code) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
111 ((and (symbolp code) (fboundp code)) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
112 (funcall code filename))) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
113 default-buffer-file-type))) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
114 |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
115 (defun find-file-binary (filename) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
116 "Visit file FILENAME and treat it as binary." |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
117 (interactive "FFind file binary: ") |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
118 (let ((file-name-buffer-file-type-alist '(("" . t)))) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
119 (find-file filename))) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
120 |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
121 (defun find-file-text (filename) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
122 "Visit file FILENAME and treat it as a text file." |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
123 (interactive "FFind file text: ") |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
124 (let ((file-name-buffer-file-type-alist '(("" . nil)))) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
125 (find-file filename))) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
126 |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
127 (defun find-file-not-found-set-buffer-file-type () |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
128 (save-excursion |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
129 (set-buffer (current-buffer)) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
130 (setq buffer-file-type (find-buffer-file-type (buffer-file-name)))) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
131 nil) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
132 |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
133 ;;; To set the default file type on new files. |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
134 (add-hook 'find-file-not-found-hooks 'find-file-not-found-set-buffer-file-type) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
135 |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
136 ;;; For using attached Unix filesystems. |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
137 (defun save-to-unix-hook () |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
138 (save-excursion |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
139 (setq buffer-file-type t)) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
140 nil) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
141 |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
142 (defun revert-from-unix-hook () |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
143 (save-excursion |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
144 (setq buffer-file-type (find-buffer-file-type (buffer-file-name)))) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
145 nil) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
146 |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
147 ;; Really should provide this capability at the drive letter granularity. |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
148 (defun using-unix-filesystems (flag) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
149 "Read and write all files assuming that they are on a drive attached |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
150 to a remote Unix file system. No CR/LF translation is done on any files |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
151 in this case. This behavior is activated when FLAG is t and deactived |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
152 when FLAG is any other value." |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
153 (if flag |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
154 (progn |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
155 (add-hook 'write-file-hooks 'save-to-unix-hook) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
156 (add-hook 'after-save-hook 'revert-from-unix-hook)) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
157 (progn |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
158 (remove-hook 'write-file-hooks 'save-to-unix-hook) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
159 (remove-hook 'after-save-hook 'revert-from-unix-hook)))) |
25dbb4494147
Hold previous change until after the release.
Karl Heuer <kwzh@gnu.org>
parents:
15252
diff
changeset
|
160 |
15135
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
161 ;;; Avoid creating auto-save file names containing illegal characters |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
162 ;;; (primarily "*", eg. for the *mail* buffer). |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
163 (fset 'original-make-auto-save-file-name |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
164 (symbol-function 'make-auto-save-file-name)) |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
165 |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
166 (defun make-auto-save-file-name () |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
167 "Return file name to use for auto-saves of current buffer. |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
168 Does not consider `auto-save-visited-file-name' as that variable is checked |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
169 before calling this function. You can redefine this for customization. |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
170 See also `auto-save-file-name-p'." |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
171 (let ((name (original-make-auto-save-file-name)) |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
172 (start 0)) |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
173 ;; destructively replace occurences of * or ? with $ |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
174 (while (string-match "[?*]" name start) |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
175 (aset name (match-beginning 0) ?$) |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
176 (setq start (1+ (match-end 0)))) |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
177 name)) |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
178 |
9803 | 179 ;;; Fix interface to (X-specific) mouse.el |
180 (defalias 'x-set-selection 'ignore) | |
181 (fset 'x-get-selection '(lambda (&rest rest) "")) | |
182 (fmakunbound 'font-menu-add-default) | |
183 (global-unset-key [C-down-mouse-1]) | |
184 (global-unset-key [C-down-mouse-2]) | |
185 (global-unset-key [C-down-mouse-3]) | |
186 | |
11399 | 187 ;;; Set to a system sound if you want a fancy bell. |
188 (set-message-beep nil) | |
189 | |
9803 | 190 ;;; winnt.el ends here |