[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to bind C-H to rubout in lisp-listeners
[Added Customer-reports: small bug fix at the end.]
Date: Tue, 2 Jul 91 14:40:36 PDT
From: starnet!bass!lakin@apple.com (Fred Lakin)
I now spend alot of my time on other keyboards and have lost
the rubout reflex -- replaced by C-H.
Using the following forms, I have managed to make C-H do rubout in zmacs
buffers and mini-buffers:
(login-eval
(set-comtab-return-undo *zmacs-comtab*
'(#\CONTROL-H COM-RUBOUT)))
(login-eval
(set-comtab-return-undo *standard-comtab*
'(#\CONTROL-H COM-RUBOUT)))
However, the all-important lisp-listener C-H is uneffected. How can
I get that too?
I was going to suggest
(LOGIN-FORMS
(SI:ADD-IE-COMMAND 'SI:COM-RUBOUT-CHARACTER #\c-H))
but the logout form for ADD-IE-COMMAND generates the wrong thing on the
logout-list, so just
(SI:ADD-IE-COMMAND 'SI:COM-RUBOUT-CHARACTER #\c-H)
for now. [The fix for the undo problem is below if you care (the
system-supplied version says DELETE-IE-COMMAND instead of
DELETE-IE-COMMANDS.]
;=====================================
(SYSTEM-INTERNALS:BEGIN-PATCH-SECTION)
(SYSTEM-INTERNALS:PATCH-SECTION-SOURCE-FILE "SYS:IO;INPUT-EDITOR.LISP.330")
(SYSTEM-INTERNALS:PATCH-SECTION-ATTRIBUTES
"-*- Syntax: Zetalisp; MODE: Lisp; Package: System-internals; Base: 8 -*-")
(DEFUN MAKE-UNDO-FOR-ADD//DELETE-IE-COMMAND (CHARS &AUX (RESULT '()))
(DOLIST (CHAR CHARS)
(SETQ CHAR (EVAL CHAR))
(LET ((ENTRY (ASS #'CHAR= CHAR *COMMAND-ALIST*)))
(PUSH (IF ENTRY
`(ADD-IE-COMMAND ',(CDR ENTRY) ,CHAR)
`(DELETE-IE-COMMANDS ,CHAR))
RESULT)))
(IF (CDR RESULT) `(PROGN ,@(NREVERSE RESULT)) (CAR RESULT)))