Mercurial > emacs
annotate lisp/w32-fns.el @ 16151:481c5be39150
(getloadavg): Add new code for SUNOS_5 to use -lkstat.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 10 Sep 1996 19:50:17 +0000 |
parents | fbe8d94bff00 |
children | a5e9fa379097 |
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 | |
9803 | 42 ;; Ignore case on file-name completion |
43 (setq completion-ignore-case t) | |
44 | |
45 ;; The cmd.exe shell uses the "/c" switch instead of the "-c" switch | |
46 ;; for executing its command line argument (from simple.el). | |
47 (setq shell-command-switch "/c") | |
48 | |
15338
b0d95c32f026
(shell-mode-hook): Set comint-completion-addsuffix
Richard M. Stallman <rms@gnu.org>
parents:
15257
diff
changeset
|
49 ;; For appending suffixes to directories and files in shell completions. |
b0d95c32f026
(shell-mode-hook): Set comint-completion-addsuffix
Richard M. Stallman <rms@gnu.org>
parents:
15257
diff
changeset
|
50 (add-hook 'shell-mode-hook |
b0d95c32f026
(shell-mode-hook): Set comint-completion-addsuffix
Richard M. Stallman <rms@gnu.org>
parents:
15257
diff
changeset
|
51 '(lambda () (setq comint-completion-addsuffix '("\\" . " ")))) |
b0d95c32f026
(shell-mode-hook): Set comint-completion-addsuffix
Richard M. Stallman <rms@gnu.org>
parents:
15257
diff
changeset
|
52 |
15592
0ebdc7e05bfd
(using-unix-filesystems): Doc fix.
Miles Bader <miles@gnu.org>
parents:
15350
diff
changeset
|
53 ;;; Avoid creating auto-save file names containing invalid characters |
15135
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
54 ;;; (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
|
55 (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
|
56 (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
|
57 |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
58 (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
|
59 "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
|
60 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
|
61 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
|
62 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
|
63 (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
|
64 (start 0)) |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
65 ;; 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
|
66 (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
|
67 (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
|
68 (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
|
69 name)) |
72a1f82a6748
(original-make-auto-save-file-name): New symbol bound
Geoff Voelker <voelker@cs.washington.edu>
parents:
15003
diff
changeset
|
70 |
9803 | 71 ;;; Fix interface to (X-specific) mouse.el |
15350
a8bd6f986389
(x-set-selection, x-get-selection): Define them to really use TYPE.
Richard M. Stallman <rms@gnu.org>
parents:
15338
diff
changeset
|
72 (defun x-set-selection (type data) |
a8bd6f986389
(x-set-selection, x-get-selection): Define them to really use TYPE.
Richard M. Stallman <rms@gnu.org>
parents:
15338
diff
changeset
|
73 (or type (setq type 'PRIMARY)) |
a8bd6f986389
(x-set-selection, x-get-selection): Define them to really use TYPE.
Richard M. Stallman <rms@gnu.org>
parents:
15338
diff
changeset
|
74 (put 'x-selections type data)) |
a8bd6f986389
(x-set-selection, x-get-selection): Define them to really use TYPE.
Richard M. Stallman <rms@gnu.org>
parents:
15338
diff
changeset
|
75 |
a8bd6f986389
(x-set-selection, x-get-selection): Define them to really use TYPE.
Richard M. Stallman <rms@gnu.org>
parents:
15338
diff
changeset
|
76 (defun x-get-selection (&optional type data-type) |
a8bd6f986389
(x-set-selection, x-get-selection): Define them to really use TYPE.
Richard M. Stallman <rms@gnu.org>
parents:
15338
diff
changeset
|
77 (or type (setq type 'PRIMARY)) |
a8bd6f986389
(x-set-selection, x-get-selection): Define them to really use TYPE.
Richard M. Stallman <rms@gnu.org>
parents:
15338
diff
changeset
|
78 (get 'x-selections type)) |
a8bd6f986389
(x-set-selection, x-get-selection): Define them to really use TYPE.
Richard M. Stallman <rms@gnu.org>
parents:
15338
diff
changeset
|
79 |
9803 | 80 (fmakunbound 'font-menu-add-default) |
81 (global-unset-key [C-down-mouse-1]) | |
82 (global-unset-key [C-down-mouse-2]) | |
83 (global-unset-key [C-down-mouse-3]) | |
84 | |
11399 | 85 ;;; Set to a system sound if you want a fancy bell. |
86 (set-message-beep nil) | |
87 | |
9803 | 88 ;;; winnt.el ends here |