unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8135: Problem about TAB in emacs23
@ 2011-02-28  4:04 dexter K
  2011-02-28 19:51 ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: dexter K @ 2011-02-28  4:04 UTC (permalink / raw)
  To: 8135

[-- Attachment #1: Type: text/plain, Size: 879 bytes --]

Hi everyone
rms says here maybe can help me find out a way to fix my problem.

I have problem in emacs with TAB

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

Is there any way  to fix  this problem ?
Cause I really dont want delete a tab by press 8 times  backspace  on the
keyboard.
If it is possible , I want change all  modes of emacs to get a REAL TAB, no
more space instead of TAB.
Thanks

[-- Attachment #2: Type: text/html, Size: 1003 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#8135: Problem about TAB in emacs23
  2011-02-28  4:04 bug#8135: Problem about TAB in emacs23 dexter K
@ 2011-02-28 19:51 ` Glenn Morris
       [not found]   ` <AANLkTikAX-bQuPnck1UdS+zsN7xaMpuOVFAmo-LG_Q+K@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2011-02-28 19:51 UTC (permalink / raw)
  To: dexter K; +Cc: 8135

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)





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#8135: Problem about TAB in emacs23
       [not found]   ` <AANLkTikAX-bQuPnck1UdS+zsN7xaMpuOVFAmo-LG_Q+K@mail.gmail.com>
@ 2011-03-01 17:47     ` Glenn Morris
  0 siblings, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2011-03-01 17:47 UTC (permalink / raw)
  To: 8135-done


dexter K. wrote (on Tue, 1 Mar 2011 at 17:59 +0800):

> Oh man, It works!
> I cant tell you how much I thank you!
> Thanks very very much






^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-01 17:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-28  4:04 bug#8135: Problem about TAB in emacs23 dexter K
2011-02-28 19:51 ` Glenn Morris
     [not found]   ` <AANLkTikAX-bQuPnck1UdS+zsN7xaMpuOVFAmo-LG_Q+K@mail.gmail.com>
2011-03-01 17:47     ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).