annotate lisp/winnt.el @ 217:d44af0c54775 r20-4b7

Import from CVS: tag r20-4b7
author cvs
date Mon, 13 Aug 2007 10:08:34 +0200
parents
children 8efd647ea9ca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
217
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
1 ;;; winnt.el --- Lisp routines for Windows NT.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
2
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
3 ;; Copyright (C) 1994 Free Software Foundation, Inc.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
4
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
5 ;; Author: Geoff Voelker (voelker@cs.washington.edu)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
6
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
7 ;; This file is part of GNU Emacs.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
8
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
9 ;; GNU Emacs is free software; you can redistribute it and/or modify
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
10 ;; it under the terms of the GNU General Public License as published by
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
11 ;; the Free Software Foundation; either version 2, or (at your option)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
12 ;; any later version.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
13
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
14 ;; GNU Emacs is distributed in the hope that it will be useful,
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
17 ;; GNU General Public License for more details.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
18
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
19 ;; You should have received a copy of the GNU General Public License
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
22 ;; Boston, MA 02111-1307, USA.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
23
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
24 ;;; Commentary:
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
25
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
26 ;; (August 12, 1993)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
27 ;; Created.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
28
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
29 ;; (November 21, 1994)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
30 ;; [C-M-backspace] defined.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
31 ;; mode-line-format defined to show buffer file type.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
32 ;; audio bell initialized.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
33 ;;
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
34 ;; (March 18, 1997)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
35 ;; Ported to XEmacs by Marc Paquette <marcpa@cam.org>
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
36 ;;
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
37
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
38 ;;; Code:
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
39
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
40 ;; Map delete and backspace
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
41 ;; Not sure this is really needed in XEmacs... --marcpa
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
42 (define-key global-map [(backspace)] 'backward-delete-char)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
43 (define-key global-map [(delete)] 'delete-char)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
44 (define-key global-map [(meta backspace)] 'backward-kill-word)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
45 (define-key global-map [(control meta backspace)] 'backward-kill-sexp)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
46
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
47 (defconst nt-modeline-buffer-type '("%t")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
48 "Modeline control for showing buffer type (binary or text).")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
49
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
50 (setq-default modeline-format
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
51 (cons (purecopy "")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
52 (cons 'nt-modeline-buffer-type
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
53 (cdr modeline-format))))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
54
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
55 ;; Ignore case on file-name completion
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
56 (setq completion-ignore-case t)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
57
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
58 ;; The cmd.exe shell uses the "/c" switch instead of the "-c" switch
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
59 ;; for executing its command line argument (from simple.el).
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
60 (setq shell-command-switch "/c")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
61
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
62 ;; For appending suffixes to directories and files in shell completions.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
63 (add-hook 'shell-mode-hook
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
64 '(lambda () (setq comint-completion-addsuffix '("\\" . " "))))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
65
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
66 ;; Use ";" instead of ":" as a path separator (from files.el).
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
67 (setq path-separator ";")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
68
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
69 ;; Set the null device (for compile.el).
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
70 (setq grep-null-device "NUL")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
71
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
72 ;; Set the grep regexp to match entries with drive letters.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
73 (setq grep-regexp-alist
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
74 '(("^\\(\\([a-zA-Z]:\\)?[^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 3)))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
75
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
76 ;; Taken from dos-fn.el ... don't want all that's in the file, maybe
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
77 ;; separate it out someday.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
78
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
79 (defvar file-name-buffer-file-type-alist
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
80 '(
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
81 ("[:/].*config.sys$" . nil) ; config.sys text
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
82 ("\\.elc$" . t) ; emacs stuff
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
83 ("\\.\\(obj\\|exe\\|com\\|lib\\|sys\\|chk\\|out\\|bin\\|ico\\|pif\\)$" . t)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
84 ; MS-Dos stuff
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
85 ("\\.\\(arc\\|zip\\|pak\\|lzh\\|zoo\\)$" . t)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
86 ; Packers
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
87 ("\\.\\(a\\|o\\|tar\\|z\\|gz\\|taz\\)$" . t)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
88 ; Unix stuff
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
89 ("\\.tp[ulpw]$" . t)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
90 ; Borland Pascal stuff
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
91 )
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
92 "*Alist for distinguishing text files from binary files.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
93 Each element has the form (REGEXP . TYPE), where REGEXP is matched
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
94 against the file name, and TYPE is nil for text, t for binary.")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
95
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
96 (defun find-buffer-file-type (filename)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
97 (let ((alist file-name-buffer-file-type-alist)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
98 (found nil)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
99 (code nil))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
100 (let ((case-fold-search t))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
101 (setq filename (file-name-sans-versions filename))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
102 (while (and (not found) alist)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
103 (if (string-match (car (car alist)) filename)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
104 (setq code (cdr (car alist))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
105 found t))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
106 (setq alist (cdr alist))))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
107 (if found
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
108 (cond((memq code '(nil t)) code)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
109 ((and (symbolp code) (fboundp code))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
110 (funcall code filename)))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
111 default-buffer-file-type)))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
112
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
113 (defun find-file-binary (filename)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
114 "Visit file FILENAME and treat it as binary."
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
115 (interactive "FFind file binary: ")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
116 (let ((file-name-buffer-file-type-alist '(("" . t))))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
117 (find-file filename)))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
118
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
119 (defun find-file-text (filename)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
120 "Visit file FILENAME and treat it as a text file."
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
121 (interactive "FFind file text: ")
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
122 (let ((file-name-buffer-file-type-alist '(("" . nil))))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
123 (find-file filename)))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
124
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
125 (defun find-file-not-found-set-buffer-file-type ()
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
126 (save-excursion
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
127 (set-buffer (current-buffer))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
128 (setq buffer-file-type (find-buffer-file-type (buffer-file-name))))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
129 nil)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
130
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
131 ;;; To set the default file type on new files.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
132 (add-hook 'find-file-not-found-hooks 'find-file-not-found-set-buffer-file-type)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
133
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
134 ;;; For using attached Unix filesystems.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
135 (defun save-to-unix-hook ()
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
136 (save-excursion
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
137 (setq buffer-file-type t))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
138 nil)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
139
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
140 (defun revert-from-unix-hook ()
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
141 (save-excursion
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
142 (setq buffer-file-type (find-buffer-file-type (buffer-file-name))))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
143 nil)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
144
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
145 ;; Really should provide this capability at the drive letter granularity.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
146 (defun using-unix-filesystems (flag)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
147 "Read and write files without CR/LF translation, if FLAG is non-nil.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
148 This is in effect assuming the files are on a remote Unix file system.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
149 If FLAG is nil, resume using CR/LF translation as usual."
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
150 (if flag
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
151 (progn
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
152 (add-hook 'write-file-hooks 'save-to-unix-hook)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
153 (add-hook 'after-save-hook 'revert-from-unix-hook))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
154 (progn
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
155 (remove-hook 'write-file-hooks 'save-to-unix-hook)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
156 (remove-hook 'after-save-hook 'revert-from-unix-hook))))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
157
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
158 ;;; Avoid creating auto-save file names containing invalid characters
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
159 ;;; (primarily "*", eg. for the *mail* buffer).
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
160 (fset 'original-make-auto-save-file-name
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
161 (symbol-function 'make-auto-save-file-name))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
162
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
163 (defun make-auto-save-file-name ()
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
164 "Return file name to use for auto-saves of current buffer.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
165 Does not consider `auto-save-visited-file-name' as that variable is checked
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
166 before calling this function. You can redefine this for customization.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
167 See also `auto-save-file-name-p'."
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
168 (let ((name (original-make-auto-save-file-name))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
169 (start 0))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
170 ;; destructively replace occurences of * or ? with $
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
171 (while (string-match "[?*]" name start)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
172 (aset name (match-beginning 0) ?$)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
173 (setq start (1+ (match-end 0))))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
174 name))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
175
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
176 ;; ### FIX ME: need to look at XEmacs xmouse.el versus FSF mouse.el
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
177 ;; and adjust accordingly: I think 'x-selections is an FSFism.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
178 ;; --marcpa
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
179 ;;; Fix interface to (X-specific) mouse.el
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
180 (defun x-set-selection (type data)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
181 (or type (setq type 'PRIMARY))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
182 (put 'x-selections type data))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
183
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
184 (defun x-get-selection (&optional type data-type)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
185 (or type (setq type 'PRIMARY))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
186 (get 'x-selections type))
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
187
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
188 ;; FSFisms
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
189 ;(fmakunbound 'font-menu-add-default)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
190 ;(global-unset-key [C-down-mouse-1])
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
191 ;(global-unset-key [C-down-mouse-2])
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
192 ;(global-unset-key [C-down-mouse-3])
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
193
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
194 ;;; Set to a system sound if you want a fancy bell.
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
195 ;(set-message-beep nil)
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
196
d44af0c54775 Import from CVS: tag r20-4b7
cvs
parents:
diff changeset
197 ;;; winnt.el ends here