Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!gem.mps.ohio-state.edu!ginosko!uunet!bu-cs!jbw From: jbw@bucsf.bu.edu (Joe Wells) Newsgroups: gnu.emacs.bug Subject: Re: keyboard-quit cannot be bound to a key Message-ID: <38926@bu-cs.BU.EDU> Date: 27 Sep 89 01:54:05 GMT References: <8909201803.AA05492@snearth.daisy.com> Sender: daemon@bu-cs.BU.EDU Distribution: gnu Organization: Boston University Computer Science Department Lines: 34 In-reply-to: daisy!dale@AI.MIT.EDU's message of 20 Sep 89 18:03:23 GMT In article <8909201803.AA05492@snearth.daisy.com> daisy!dale@AI.MIT.EDU (Dale DePriest) writes: The keyboard-quit command normally bound to ^g cannot be bound to another key. I tried to use the command: (global-set-key "\177" 'keyboard-quit) to define the del key as a cancel function. This cancels the input as expected but leaves the M-x prompt and doesn't actually perform the function of keyboard-quit. C-g also has bindings in several keymaps that are used as the local keymap in the minibuffer. Try doing this also: (define-key minibuffer-local-must-match-map "\C-?" 'abort-recursive-edit) (define-key minibuffer-local-map "\C-?" 'abort-recursive-edit) (define-key minibuffer-local-ns-map "\C-?" 'abort-recursive-edit) (define-key minibuffer-local-completion-map "\C-?" 'abort-recursive-edit) (define-key repeat-complex-command-map "\C-?" 'abort-recursive-edit) It might actually be easier to play around with the value of keyboard-translate-table. In any case, you will not get the full functionality of C-g on C-?, since the value 7 is hardcoded into 20 or 30 different places in the GNU Emacs C source code. Pressing a C-g will still deliver an interrupt signal to the Emacs process, which will be handled as before. Enjoy, -- Joe Wellsjbw%bucsf.bu.edu@bu-it.bu.edu ...!harvard!bu-cs!bucsf!jbw