]> code.delx.au - gnu-emacs/blobdiff - lisp/w32-fns.el
(Man-filter-list): Recognize "Rev" footers.
[gnu-emacs] / lisp / w32-fns.el
index 388a5dd88180da05e41396873c6cf9f8fec4764f..7790d5178f81806b77abbc57fa3493b906ead694 100644 (file)
 ;;; 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:
 
 (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)
 ;; 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