home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / emacs / help / 4058 < prev    next >
Encoding:
Text File  |  1992-09-09  |  1.4 KB  |  42 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!utcsri!torn!cunews!nrcnet0!bnrgate!bcars6a8!keithh
  3. From: keithh@bnr.ca (Keith Hanlan)
  4. Subject: Re: Need help with TABith TABS & Is there a PASCAL Mode?
  5. Message-ID: <1992Sep10.002725.562@bcars6a8.bnr.ca>
  6. Keywords: emacs, TABS, PASCAL
  7. Sender: usenet@bcars6a8.bnr.ca (Use Net)
  8. Nntp-Posting-Host: bcarh10f
  9. Organization: Bell-Northern Research Ltd., Ottawa
  10. References: <1992Sep09.164543.3179@bnr.ca> <1992Sep09.171648.3781@bnr.ca>
  11. Date: Thu, 10 Sep 1992 00:27:25 GMT
  12. Lines: 28
  13.  
  14. In article <1992Sep09.171648.3781@bnr.ca> mac@bnr.ca (Michael Campbell) writes:
  15. >Baji (and anyone else interested), 
  16. >
  17. >To force emacs to do indentation with spaces only, I have the
  18. >following in my .emacs:
  19. >
  20. >  (setq indent-tabs-mode nil)
  21.  
  22. I am just learning emacs now but as soon as my proficiency picks
  23. up a bit here is what I am going to do:
  24. o set tab-width to whatever I prefer.
  25.  
  26. o hook into reading in a file a function which automatically
  27.   tabifies the file.  This means assuming that the file was
  28.   written with a tabstop of eight.
  29.  
  30. o hook into writing out a file (write-file-hooks) a function 
  31.   which, depending on the type of file, either:
  32.   o untabifies the file completely or
  33.   o untabifies the file, resets the tab-width to eight, and
  34.     then tabifies the file again.
  35.  
  36. And then I'll never have to worry about tab-widths again!
  37.  
  38. Please feel free to shoot holes in my plan or give me an
  39. off-the-shelf solution.
  40.  
  41. Regards,
  42.