X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/95ed00257adf283a2740cb3e4feb83c075620ef8..9afa72e8e6c422cc02cca010e9c07a03a87bdfd8:/lisp/w32-fns.el diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el index 388a5dd881..7790d5178f 100644 --- a/lisp/w32-fns.el +++ b/lisp/w32-fns.el @@ -22,12 +22,12 @@ ;;; Commentary: ;; (August 12, 1993) -;; NT switches placed in: -;; -;; compile.el, dired-new.el, dired.el, loadup.el, startup.el, subr.el +;; Created. -;; (November 21, 1993) -;; General stuffing for supporting Windows NT. +;; (November 21, 1994) +;; [C-M-backspace] defined. +;; mode-line-format defined to show buffer file type. +;; audio bell initialized. ;;; Code: @@ -35,6 +35,23 @@ (define-key function-key-map [backspace] "\177") (define-key function-key-map [delete] "\C-d") (define-key function-key-map [M-backspace] [?\M-\177]) +(define-key function-key-map [C-M-backspace] [\C-\M-delete]) + +;; Show file type (text or binary) on modeline +(setq-default mode-line-format + (list (purecopy "") + 'mode-line-modified + 'mode-line-buffer-identification + (purecopy " ") + 'global-mode-string + (purecopy " %[(") + (purecopy "%t:") + 'mode-name 'mode-line-process 'minor-mode-alist + (purecopy "%n") + (purecopy ")%]--") + (purecopy '(line-number-mode "L%l--")) + (purecopy '(-3 . "%p")) + (purecopy "-%-"))) ;; Ignore case on file-name completion (setq completion-ignore-case t) @@ -43,6 +60,16 @@ ;; for executing its command line argument (from simple.el). (setq shell-command-switch "/c") +;; Use ";" instead of ":" as a path separator (from files.el). +(setq path-separator ";") + +;; Set the null device (for compile.el). +(setq grep-null-device "NUL") + +;; Set the grep regexp to match entries with drive letters. +(setq grep-regexp-alist + '(("^\\(\\([a-zA-Z]:\\)?[^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 3))) + ;; Taken from dos-fn.el ... don't want all that's in the file, maybe ;; separate it out someday. @@ -103,8 +130,30 @@ against the file name, and TYPE is nil for text, t for binary.") ;;; To set the default file type on new files. (add-hook 'find-file-not-found-hooks 'find-file-not-found-set-buffer-file-type) +;;; For using attached Unix filesystems. +(defun save-to-unix-hook () + (save-excursion + (setq buffer-file-type t)) + nil) + +(defun revert-from-unix-hook () + (save-excursion + (setq buffer-file-type (find-buffer-file-type (buffer-file-name)))) + nil) + +;; Really should provide this capability at the drive letter granularity. +(defun using-unix-filesystems (flag) + (if flag + (progn + (add-hook 'write-file-hooks 'save-to-unix-hook) + (add-hook 'write-contents-hooks 'save-to-unix-hook) + (add-hook 'after-save-hook 'revert-from-unix-hook)) + (progn + (remove-hook 'write-file-hooks 'save-to-unix-hook) + (remove-hook 'write-contents-hooks 'save-to-unix-hook) + (remove-hook 'after-save-hook 'revert-from-unix-hook)))) + ;;; Fix interface to (X-specific) mouse.el -(defalias 'window-frame 'ignore) (defalias 'x-set-selection 'ignore) (fset 'x-get-selection '(lambda (&rest rest) "")) (fmakunbound 'font-menu-add-default) @@ -112,4 +161,7 @@ against the file name, and TYPE is nil for text, t for binary.") (global-unset-key [C-down-mouse-2]) (global-unset-key [C-down-mouse-3]) +;;; Set to a system sound if you want a fancy bell. +(set-message-beep nil) + ;;; winnt.el ends here