GNU bug report logs -
#8135
Problem about TAB in emacs23
Previous Next
Reported by: dexter K <dexterkidd <at> gmail.com>
Date: Mon, 28 Feb 2011 05:04:02 UTC
Severity: wishlist
Tags: notabug
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 8135 <at> debbugs.gnu.org (full text, mbox):
dexter K wrote:
> I want have a real tab , when I press TAB, it goes like 8 spaces distances..
> I did it with this code:
> -------
>
> (global-set-key (kbd "TAB") 'self-insert-command)
> (setq default-tab-width 8)
> (setq tab-width 8)
> (setq c-basic-indent 8)
>
> (global-set-key [delete] 'delete-char)
> (global-set-key [backspace] 'delete-backward-char)
>
> -------
>
> it works both on windows & mac , the most important is I can delete a whole
> tab distances like 8 spaces when I press [BackSpace] key
> But it failed again in my Centos ,when I done complie emacs 23.2
This does not look like an Emacs bug, and probably would have been
better suited to the help-gnu-emacs mailing list.
Comments:
1) The default tab-width is 8.
2) There is no `c-basic-indent' variable. Maybe you meant c-basic-offset?
3) delete runs `delete-char' by default.
4) C-h k BACKSPACE tells me that I can customize the behaviour
by setting `backward-delete-char-untabify-method'.
So in Emacs 23.2 I get the behaviour that you want simply with:
(global-set-key (kbd "TAB") 'self-insert-command)
(setq backward-delete-char-untabify-method nil)
This bug report was last modified 14 years and 86 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.