Mercurial > hg > xemacs-beta
comparison lisp/x-win-xfree86.el @ 209:41ff10fd062f r20-4b3
Import from CVS: tag r20-4b3
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:04:58 +0200 |
parents | |
children | 434959a2fba3 |
comparison
equal
deleted
inserted
replaced
208:f427b8ec4379 | 209:41ff10fd062f |
---|---|
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 ;; Author: Martin Buchholz (rewritten to use function-key-map) | |
7 ;; Keywords: terminals | |
8 | |
9 ;; This file is part of XEmacs. | |
10 | |
11 ;; XEmacs is free software; you can redistribute it and/or modify it | |
12 ;; under the terms of the GNU General Public License as published by | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 | |
16 ;; XEmacs is distributed in the hope that it will be useful, but | |
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
19 ;; General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with XEmacs; see the file COPYING. If not, write to the | |
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
24 ;; Boston, MA 02111-1307, USA. | |
25 | |
26 ;;; Commentary: | |
27 | |
28 ;; This file is loaded by x-win.el at run-time when we are sure that XEmacs | |
29 ;; is running on the display of something running XFree86 (Linux, | |
30 ;; NetBSD, FreeBSD, and perhaps other Intel Unixen). | |
31 | |
32 ;;; #### bleck!!! Use key-translation-map! | |
33 | |
34 ;;; #### Counter-bleck!! We shouldn't override a user binding for F13. | |
35 ;;; So we use function-key-map for now. | |
36 ;;; When we've implemented a fallback-style equivalent of | |
37 ;;; keyboard-translate-table, we'll use that instead. (mrb) | |
38 | |
39 ;; For no obvious reason, shift-F1 is called F13, although Meta-F1 and | |
40 ;; Control-F1 have normal names. | |
41 | |
42 (loop for (x-key key sane-key) in | |
43 '(("F13" f13 f1) | |
44 ("F14" f14 f2) | |
45 ("F15" f15 f3) | |
46 ("F16" f16 f4) | |
47 ("F17" f17 f5) | |
48 ("F18" f18 f6) | |
49 ("F19" f19 f7) | |
50 ("F20" f20 f8) | |
51 ("F21" f21 f9) | |
52 ("F22" f22 f10) | |
53 ("F23" f23 f11) | |
54 ("F24" f24 f12)) | |
55 do | |
56 (when (and (x-keysym-on-keyboard-p x-key) | |
57 (not (x-keysym-on-keyboard-sans-modifiers-p x-key))) | |
58 ;; define also the control, meta, and meta-control versions. | |
59 (loop for mods in '(() (control) (meta) (meta control)) do | |
60 (define-key function-key-map `[(,@mods ,key)] `[(shift ,@mods ,sane-key)]) | |
61 ))) | |
62 | |
63 ;; (let ((mapping '((f13 . (shift f1)) | |
64 ;; (f14 . (shift f2)) | |
65 ;; (f15 . (shift f3)) | |
66 ;; (f16 . (shift f4)) | |
67 ;; (f17 . (shift f5)) | |
68 ;; (f18 . (shift f6)) | |
69 ;; (f19 . (shift f7)) | |
70 ;; (f20 . (shift f8)) | |
71 ;; (f21 . (shift f9)) | |
72 ;; (f22 . (shift f10)) | |
73 ;; (f23 . (shift f11)) | |
74 ;; (f24 . (shift f12))))) | |
75 ;; | |
76 ;; ;; now define them and also the control, meta, and meta-control versions. | |
77 ;; (while mapping | |
78 ;; (let* ((foo (caar mapping)) | |
79 ;; (bar (cdar mapping)) | |
80 ;; (foo (if (listp foo) foo (list foo))) | |
81 ;; (bar (if (listp bar) bar (list bar)))) | |
82 ;; (let ((mods '(() (control) (meta) (meta control)))) | |
83 ;; (while mods | |
84 ;; (let ((k1 (vector (append (car mods) foo))) | |
85 ;; (k2 (vector (append (car mods) bar)))) | |
86 ;; (define-key global-map k1 k2)) | |
87 ;; (setq mods (cdr mods)))) | |
88 ;; (setq mapping (cdr mapping))))) |