help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: custom backspace


From: Drew Adams
Subject: RE: custom backspace
Date: Tue, 22 Apr 2014 18:45:28 -0700 (PDT)

> 1. "m-x describe-key" tells me that my "backspace" or DEL is bound to
>  (backward-delete-char-untabify ARG &optional KILLP)
> 
>   with value untabify. But if type lots of spaces (e.g. in the scratch or my
> .emacs) and then press backspace, it only goes back one character at a
> time... not untabbing.

It *is* untabifying.  If the char before point is a tab character,
then without untabifying behavior that char is removed.  With
untabifying, the tab char is converted to SPC chars and then one of
those SPC chars is removed, instead.

> 2. describe on my control-backspace reveals that this is bound to C-
> backspace. But when I try to create any form of binding for C-backspace in
> my .emacs I get an error that control must be followed by a single
> character... so I don't have a clue how to rebind this.

Use `C-h k', then hit the `C-backspace' key.  It tells you something
like this:

  <C-backspace> runs the command backward-kill-paragraph...

Now you know how Emacs prints the name of that key sequence: <C-backspace>.
So do this:
(global-set-key (kbd "<C-backspace>") 'your-command)

See the Emacs manual, node `Init Rebinding'.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]