Mercurial > emacs
changeset 83327:950de36a755d
Speed up loading of term/xterm.el.
* lisp/term/xterm.el: Don't do the key substitutions unless f13-f60 are
really defined.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-367
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Mon, 27 Jun 2005 03:46:25 +0000 |
parents | 8eafadd7838b |
children | f2eb4324cbaf |
files | lisp/term/xterm.el |
diffstat | 1 files changed, 52 insertions(+), 49 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/term/xterm.el Mon Jun 27 03:19:27 2005 +0000 +++ b/lisp/term/xterm.el Mon Jun 27 03:46:25 2005 +0000 @@ -201,57 +201,60 @@ ;; definition if found in function-key-map, there are no further ;; lookups in other keymaps. (let ((m (terminal-local-value 'function-key-map nil))) - (substitute-key-definition [f13] [S-f1] m) - (substitute-key-definition [f14] [S-f2] m) - (substitute-key-definition [f15] [S-f3] m) - (substitute-key-definition [f16] [S-f4] m) - (substitute-key-definition [f17] [S-f5] m) - (substitute-key-definition [f18] [S-f6] m) - (substitute-key-definition [f19] [S-f7] m) - (substitute-key-definition [f20] [S-f8] m) - (substitute-key-definition [f21] [S-f9] m) - (substitute-key-definition [f22] [S-f10] m) - (substitute-key-definition [f23] [S-f11] m) - (substitute-key-definition [f24] [S-f12] m) - - (substitute-key-definition [f25] [C-f1] m) - (substitute-key-definition [f26] [C-f2] m) - (substitute-key-definition [f27] [C-f3] m) - (substitute-key-definition [f28] [C-f4] m) - (substitute-key-definition [f29] [C-f5] m) - (substitute-key-definition [f30] [C-f6] m) - (substitute-key-definition [f31] [C-f7] m) - (substitute-key-definition [f32] [C-f8] m) - (substitute-key-definition [f33] [C-f9] m) - (substitute-key-definition [f34] [C-f10] m) - (substitute-key-definition [f35] [C-f11] m) - (substitute-key-definition [f36] [C-f12] m) + ;; This stuff takes several seconds; don't do it unless the keys + ;; seem to be defined. + (when (lookup-key m [f13]) + (substitute-key-definition [f13] [S-f1] m) + (substitute-key-definition [f14] [S-f2] m) + (substitute-key-definition [f15] [S-f3] m) + (substitute-key-definition [f16] [S-f4] m) + (substitute-key-definition [f17] [S-f5] m) + (substitute-key-definition [f18] [S-f6] m) + (substitute-key-definition [f19] [S-f7] m) + (substitute-key-definition [f20] [S-f8] m) + (substitute-key-definition [f21] [S-f9] m) + (substitute-key-definition [f22] [S-f10] m) + (substitute-key-definition [f23] [S-f11] m) + (substitute-key-definition [f24] [S-f12] m) - (substitute-key-definition [f37] [C-S-f1] m) - (substitute-key-definition [f38] [C-S-f2] m) - (substitute-key-definition [f39] [C-S-f3] m) - (substitute-key-definition [f40] [C-S-f4] m) - (substitute-key-definition [f41] [C-S-f5] m) - (substitute-key-definition [f42] [C-S-f6] m) - (substitute-key-definition [f43] [C-S-f7] m) - (substitute-key-definition [f44] [C-S-f8] m) - (substitute-key-definition [f45] [C-S-f9] m) - (substitute-key-definition [f46] [C-S-f10] m) - (substitute-key-definition [f47] [C-S-f11] m) - (substitute-key-definition [f48] [C-S-f12] m) + (substitute-key-definition [f25] [C-f1] m) + (substitute-key-definition [f26] [C-f2] m) + (substitute-key-definition [f27] [C-f3] m) + (substitute-key-definition [f28] [C-f4] m) + (substitute-key-definition [f29] [C-f5] m) + (substitute-key-definition [f30] [C-f6] m) + (substitute-key-definition [f31] [C-f7] m) + (substitute-key-definition [f32] [C-f8] m) + (substitute-key-definition [f33] [C-f9] m) + (substitute-key-definition [f34] [C-f10] m) + (substitute-key-definition [f35] [C-f11] m) + (substitute-key-definition [f36] [C-f12] m) - (substitute-key-definition [f49] [A-f1] m) - (substitute-key-definition [f50] [A-f2] m) - (substitute-key-definition [f51] [A-f3] m) - (substitute-key-definition [f52] [A-f4] m) - (substitute-key-definition [f53] [A-f5] m) - (substitute-key-definition [f54] [A-f6] m) - (substitute-key-definition [f55] [A-f7] m) - (substitute-key-definition [f56] [A-f8] m) - (substitute-key-definition [f57] [A-f9] m) - (substitute-key-definition [f58] [A-f10] m) - (substitute-key-definition [f59] [A-f11] m) - (substitute-key-definition [f60] [A-f12] m)) + (substitute-key-definition [f37] [C-S-f1] m) + (substitute-key-definition [f38] [C-S-f2] m) + (substitute-key-definition [f39] [C-S-f3] m) + (substitute-key-definition [f40] [C-S-f4] m) + (substitute-key-definition [f41] [C-S-f5] m) + (substitute-key-definition [f42] [C-S-f6] m) + (substitute-key-definition [f43] [C-S-f7] m) + (substitute-key-definition [f44] [C-S-f8] m) + (substitute-key-definition [f45] [C-S-f9] m) + (substitute-key-definition [f46] [C-S-f10] m) + (substitute-key-definition [f47] [C-S-f11] m) + (substitute-key-definition [f48] [C-S-f12] m) + + (substitute-key-definition [f49] [A-f1] m) + (substitute-key-definition [f50] [A-f2] m) + (substitute-key-definition [f51] [A-f3] m) + (substitute-key-definition [f52] [A-f4] m) + (substitute-key-definition [f53] [A-f5] m) + (substitute-key-definition [f54] [A-f6] m) + (substitute-key-definition [f55] [A-f7] m) + (substitute-key-definition [f56] [A-f8] m) + (substitute-key-definition [f57] [A-f9] m) + (substitute-key-definition [f58] [A-f10] m) + (substitute-key-definition [f59] [A-f11] m) + (substitute-key-definition [f60] [A-f12] m))) ;; Set up colors, for those versions of xterm that support it.