LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-08-2005, 04:18 PM   #1
ratm1286
LQ Newbie
 
Registered: May 2005
Posts: 2

Rep: Reputation: 0
tabs to spaces in emacs, not working in tcl mode


I wish to have every tab in emacs be just two spaces. I have added to following lines to my .emacs file

(setq-default indent-tabs-mode nil)
(setq-default tab-width 2)

This will work as wanted for any normal text file. But when I edit a tcl file, it just goes back to what it was doing before... 5 spaces for each tab. I want these settings to also work for tcl mode... is there another file I must edit??
 
Old 05-08-2005, 04:38 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Since the major-mode is loaded on demand (after your personalised
settings) it can easily override yours. You may have to locate and
edit /path/to/emacs/lisp/progmodes/tcl.el to match your tabs ....


Cheers,
Tink
 
Old 05-08-2005, 05:10 PM   #3
ratm1286
LQ Newbie
 
Registered: May 2005
Posts: 2

Original Poster
Rep: Reputation: 0
Unfortunetley, I'm using a computer on a network at a University... and I'm only allowed to modify files in my home directory (such as my .emacs). I found the tcl.el, however, of course, it was read only. Is there maybe a command I can put in my .emacs to override the tcl mode indent??
 
Old 05-08-2005, 05:15 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Nope - you can only run that tabing command after
the tcl mode is loaded ...


Cheers,
Tink
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Emacs problem with tabs Nylex Linux - Software 2 09-03-2004 04:28 AM
emacs: requiring tabs in all indentation prell Linux - Software 0 08-24-2004 09:32 AM
TCL Scripting in Emacs wildcat22 Linux - Software 4 08-06-2004 11:12 AM
emacs - convert auto indent tabs to spaces? BrianK Linux - General 1 04-15-2004 10:14 PM
Disabling cc-mode Emacs amannuc Linux - Software 0 10-21-2003 12:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration