comparison lisp/x11/x-win-xfree86.el @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children b82b59fe008d
comparison
equal deleted inserted replaced
-1:000000000000 0:376386a54a3c
1 ;;; x-win-xfree86.el --- runtime initialization for XFree86 servers
2 ;; Copyright (C) 1995 Sun Microsystems, Inc.
3 ;; Copyright (C) 1995 Ben Wing.
4
5 ;; Author: Ben Wing
6 ;; Keywords: terminals
7
8 ;; This file is part of XEmacs.
9
10 ;; XEmacs is free software; you can redistribute it and/or modify it
11 ;; under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; any later version.
14
15 ;; XEmacs is distributed in the hope that it will be useful, but
16 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ;; General Public License for more details.
19
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with XEmacs; see the file COPYING. If not, write to the Free
22 ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23
24 ;;; Commentary:
25
26 ;; This file is loaded by x-win.el at run-time when we are sure that XEmacs
27 ;; is running on the display of something running XFree86 (Linux,
28 ;; NetBSD, FreeBSD, and perhaps other Intel Unixen).
29
30 ;;; #### bleck!!! Use key-translation-map!
31
32 ;; For no obvious reason, shift-F1 is called F13, although Meta-F1 and
33 ;; Control-F1 have normal names.
34
35 (let ((mapping '((f13 . (shift f1))
36 (f14 . (shift f2))
37 (f15 . (shift f3))
38 (f16 . (shift f4))
39 (f17 . (shift f5))
40 (f18 . (shift f6))
41 (f19 . (shift f7))
42 (f20 . (shift f8))
43 (f21 . (shift f9))
44 (f22 . (shift f10))
45 (f23 . (shift f11))
46 (f24 . (shift f12)))))
47
48 ;; now define them and also the control, meta, and meta-control versions.
49 (while mapping
50 (let* ((foo (caar mapping))
51 (bar (cdar mapping))
52 (foo (if (listp foo) foo (list foo)))
53 (bar (if (listp bar) bar (list bar))))
54 (let ((mods '(() (control) (meta) (meta control))))
55 (while mods
56 (let ((k1 (vector (append (car mods) foo)))
57 (k2 (vector (append (car mods) bar))))
58 (define-key global-map k1 k2))
59 (setq mods (cdr mods))))
60 (setq mapping (cdr mapping)))))