home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.emacs
- Path: sparky!uunet!mcsun!sun4nl!nikhefk!templon
- From: templon@paramount.nikhefk.nikhef.nl (Jeffrey Templon)
- Subject: Need Help Keybinding/X-Function (I give up!)
- Message-ID: <1992Jul23.095406.23227@paramount.nikhefk.nikhef.nl>
- Organization: NIKHEFK
- Date: Thu, 23 Jul 1992 09:54:06 GMT
- Lines: 72
-
-
- I am trying to bind some of the functions on a Sparc keyboard
- to be the same as they are for shelltool, etc. I am having
- problems. At the moment I am working on a Sparcstation 1+,
- running SunOs 4.1.2, emacs 18.57. Here is the relevant
- snatch of my .emacs file. I appreciate any assistance.
-
- oh, yes, what happens? Well, when I do a C-h k on the "Paste"
- key, it indeed reports the binding. But when I just hit
- the "Paste" key, nothing happens. Yes I have verified that
- something was in the x-cut-buffer.
-
- ----------------------------------------
- ;;;
- ;;;
- ;;;
- (defun sparc () "Setup Sun Keyboard, assume sun-4"
- ;;;
- ;;; The following comes from sun.el in the standard distribution
- ;;; handle sun's extra function keys
- ;;; this version for those who run with standard .ttyswrc and no emacstool
- ;;;
- ;;; sunview picks up expose and open on the way UP,
- ;;; so we ignore them on the way down
- ;;;
-
- (defvar sun-esc-bracket t
- "*If non-nil, rebind ESC [ as prefix for Sun function keys.")
-
- (defvar sun-raw-map (make-sparse-keymap) "*Keymap for ESC-[ encoded keyboard")
-
- ;;;
- ;;; X-windows binding stuff -- construction in progress
- ;;;
- (define-key sun-raw-map "199z" '(lambda ()
- (interactive)
- (insert (x-get-cut-buffer))))
- (if sun-esc-bracket
- (progn
- (define-key esc-map "[" sun-raw-map) ; Install sun-raw-map
- (define-key esc-map "[[" 'backward-paragraph) ; the original esc-[
- ))
- )
- ;;;
- ;;;
- (defun jtdef () "J. T.'s special definitions: get arrow keys, etc."
- (interactive)
- ;;;
- ;;; do terminal-specific stuff here
- ;;;
- (if (string-equal (getenv "TERM") "sun-cmd") (sparc))
- ;;;
- ;;; swap delete and backspace for NIKHEF people
- ;;;
- (let ((the-table (make-string 128 0)))
- (let ((i 0))
- (while (< i 128)
- (aset the-table i i)
- (setq i (1+ i))))
- ;; Swap ^H and DEL
- (aset the-table ?\177 ?\^h)
- (aset the-table ?\^h ?\177)
- (aset the-table ?\^^ ?\^s)
- (aset the-table ?\^\\ ?\^q)
- (setq keyboard-translate-table the-table)))
- ;;;
- ;;;
- ;
- (setq-default truncate-lines t)
- (setq default-major-mode 'text-mode)
- (setq initial-major-mode 'text-mode)
- (setq term-setup-hook 'jtdef)
-