aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-03-11 18:50:04 +0000
committerRichard M. Stallman1993-03-11 18:50:04 +0000
commit3d80ef3f9d123cc04dca6b6aa8f6ae160ebf6d27 (patch)
treefcefa8351db759cf3b67dfa074d7f935996f40fd
parentef61be135dfced7c19da291de05fc969a25fd34a (diff)
downloademacs-3d80ef3f9d123cc04dca6b6aa8f6ae160ebf6d27.tar.gz
emacs-3d80ef3f9d123cc04dca6b6aa8f6ae160ebf6d27.zip
Cancel previous change, since it discarded
earlier necessary changes.
-rw-r--r--lisp/term/x-win.el56
1 files changed, 43 insertions, 13 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index c016a8c5136..3df0f978913 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -1,8 +1,4 @@
1;;; x-win.el --- parse switches controlling interface with X window system 1;; Parse switches controlling how Emacs interfaces with X window system.
2
3;; Author: FSF
4;; Keywords: terminals
5
6;; Copyright (C) 1990 Free Software Foundation, Inc. 2;; Copyright (C) 1990 Free Software Foundation, Inc.
7 3
8;; This file is part of GNU Emacs. 4;; This file is part of GNU Emacs.
@@ -22,7 +18,6 @@
22;; file named COPYING. Among other things, the copyright notice 18;; file named COPYING. Among other things, the copyright notice
23;; and this notice must be preserved on all copies. 19;; and this notice must be preserved on all copies.
24 20
25;;; Commentary:
26 21
27;; X-win.el: this file is loaded from ../lisp/startup.el when it recognizes 22;; X-win.el: this file is loaded from ../lisp/startup.el when it recognizes
28;; that X windows are to be used. Command line switches are parsed and those 23;; that X windows are to be used. Command line switches are parsed and those
@@ -31,8 +26,6 @@
31 26
32;; startup.el will then examine startup files, and eventually call the hooks 27;; startup.el will then examine startup files, and eventually call the hooks
33;; which create the first window (s). 28;; which create the first window (s).
34
35;;; Code:
36 29
37;; These are the standard X switches from the Xt Initialize.c file of 30;; These are the standard X switches from the Xt Initialize.c file of
38;; Release 4. 31;; Release 4.
@@ -424,8 +417,46 @@ This returns ARGS with the arguments that have been processed removed."
424 417
425;;;; Function keys 418;;;; Function keys
426 419
420;;; Give some common function keys reasonable definitions.
421(define-key global-map [home] 'beginning-of-line)
422(define-key global-map [left] 'backward-char)
423(define-key global-map [up] 'previous-line)
424(define-key global-map [right] 'forward-char)
425(define-key global-map [down] 'next-line)
426(define-key global-map [prior] 'scroll-down)
427(define-key global-map [next] 'scroll-up)
428(define-key global-map [M-next] 'scroll-other-window)
429(define-key global-map [begin] 'beginning-of-buffer)
430(define-key global-map [end] 'end-of-buffer)
431
427(define-key global-map "\C-z" 'iconify-frame) 432(define-key global-map "\C-z" 'iconify-frame)
428 433
434;; Map certain keypad keys into ASCII characters
435;; that people usually expect.
436(define-key function-key-map [backspace] [127])
437(define-key function-key-map [delete] [127])
438(define-key function-key-map [tab] [?\t])
439(define-key function-key-map [linefeed] [?\n])
440(define-key function-key-map [clear] [11])
441(define-key function-key-map [return] [13])
442(define-key function-key-map [escape] [?\e])
443(define-key function-key-map [M-backspace] [?\M-\d])
444(define-key function-key-map [M-delete] [?\M-\d])
445(define-key function-key-map [M-tab] [?\M-\t])
446(define-key function-key-map [M-linefeed] [?\M-\n])
447(define-key function-key-map [M-clear] [?\M-\013])
448(define-key function-key-map [M-return] [?\M-\015])
449(define-key function-key-map [M-escape] [?\M-\e])
450
451;; These tell read-char how to convert
452;; these special chars to ASCII.
453(put 'backspace 'ascii-character 127)
454(put 'delete 'ascii-character 127)
455(put 'tab 'ascii-character ?\t)
456(put 'linefeed 'ascii-character ?\n)
457(put 'clear 'ascii-character 12)
458(put 'return 'ascii-character 13)
459(put 'escape 'ascii-character ?\e)
429 460
430;;;; Selections and cut buffers 461;;;; Selections and cut buffers
431 462
@@ -477,9 +508,10 @@ This returns ARGS with the arguments that have been processed removed."
477 (setq x-display-name (getenv "DISPLAY")))) 508 (setq x-display-name (getenv "DISPLAY"))))
478 509
479(setq frame-creation-function 'x-create-frame) 510(setq frame-creation-function 'x-create-frame)
480(setq suspend-hook 511
481 '(lambda () 512(defun x-win-suspend-error ()
482 (error "Suspending an emacs running under X makes no sense"))) 513 (error "Suspending an emacs running under X makes no sense"))
514(add-hook 'suspend-hooks 'x-win-suspend-error)
483 515
484;;; Arrange for the kill and yank functions to set and check the clipboard. 516;;; Arrange for the kill and yank functions to set and check the clipboard.
485(setq interprogram-cut-function 'x-select-text) 517(setq interprogram-cut-function 'x-select-text)
@@ -488,5 +520,3 @@ This returns ARGS with the arguments that have been processed removed."
488;;; Turn off window-splitting optimization; X is usually fast enough 520;;; Turn off window-splitting optimization; X is usually fast enough
489;;; that this is only annoying. 521;;; that this is only annoying.
490(setq split-window-keep-point t) 522(setq split-window-keep-point t)
491
492;;; x-win.el ends here