LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   tabs to spaces in emacs, not working in tcl mode (https://www.linuxquestions.org/questions/linux-software-2/tabs-to-spaces-in-emacs-not-working-in-tcl-mode-321411/)

ratm1286 05-08-2005 04:18 PM

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??

Tinkster 05-08-2005 04:38 PM

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

ratm1286 05-08-2005 05:10 PM

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??

Tinkster 05-08-2005 05:15 PM

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


Cheers,
Tink


All times are GMT -5. The time now is 07:00 AM.