sperber(a)informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor])
wrote:
All excellent answers. (Thanks, Jan!) They still doesn't answer
the
basic question why I can't rebind this key inside XEmacs, when I can
rebind every other key. Note that I don't care about most of the
issues raised by other people. I don't care about Help, specifically.
Well, if you're trying to do this from ~/.emacs, you have to do it
via "term-setup-hook", as Emacs loads the term setup code *AFTER*
reading your ~/.emacs file (which means that any changes made in ~/.emacs
get blown away). Here's an example (for someone who recently asked me
how to force C-h to be 'delete-backward-char, and not help):
===============================================================================
;; Add this to your ~/.emacs file:
(defun munge-keyboard ()
(let ()
(cond
( (eq window-system 'x)
(progn
;; Setup for X-windows
(global-set-key "\C-h" 'delete-backward-char)
))
( (or (string= (getenv "TERM") "vt100") (string= (getenv
"TERM") "vt102"))
(progn
;; Setup for VT-100 terminals
;; Do other stuff here.
))
)
))
(add-hook 'term-setup-hook 'munge-keyboard)
===============================================================================
--
Darryl Okahata
darrylo(a)sr.hp.com
DISCLAIMER: this message is the author's personal opinion and does not
constitute the support, opinion, or policy of Agilent Technologies, or
of the little green men that have been following him all day.