diff options
| -rw-r--r-- | lisp/w32-fns.el | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el index aef3d5550c2..0502fe9986a 100644 --- a/lisp/w32-fns.el +++ b/lisp/w32-fns.el | |||
| @@ -154,6 +154,24 @@ against the file name, and TYPE is nil for text, t for binary.") | |||
| 154 | (remove-hook 'write-file-hooks 'save-to-unix-hook) | 154 | (remove-hook 'write-file-hooks 'save-to-unix-hook) |
| 155 | (remove-hook 'after-save-hook 'revert-from-unix-hook)))) | 155 | (remove-hook 'after-save-hook 'revert-from-unix-hook)))) |
| 156 | 156 | ||
| 157 | ;;; Avoid creating auto-save file names containing illegal characters | ||
| 158 | ;;; (primarily "*", eg. for the *mail* buffer). | ||
| 159 | (fset 'original-make-auto-save-file-name | ||
| 160 | (symbol-function 'make-auto-save-file-name)) | ||
| 161 | |||
| 162 | (defun make-auto-save-file-name () | ||
| 163 | "Return file name to use for auto-saves of current buffer. | ||
| 164 | Does not consider `auto-save-visited-file-name' as that variable is checked | ||
| 165 | before calling this function. You can redefine this for customization. | ||
| 166 | See also `auto-save-file-name-p'." | ||
| 167 | (let ((name (original-make-auto-save-file-name)) | ||
| 168 | (start 0)) | ||
| 169 | ;; destructively replace occurences of * or ? with $ | ||
| 170 | (while (string-match "[?*]" name start) | ||
| 171 | (aset name (match-beginning 0) ?$) | ||
| 172 | (setq start (1+ (match-end 0)))) | ||
| 173 | name)) | ||
| 174 | |||
| 157 | ;;; Fix interface to (X-specific) mouse.el | 175 | ;;; Fix interface to (X-specific) mouse.el |
| 158 | (defalias 'x-set-selection 'ignore) | 176 | (defalias 'x-set-selection 'ignore) |
| 159 | (fset 'x-get-selection '(lambda (&rest rest) "")) | 177 | (fset 'x-get-selection '(lambda (&rest rest) "")) |