home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / emacs / 3793 < prev    next >
Encoding:
Text File  |  1992-12-15  |  2.3 KB  |  54 lines

  1. Newsgroups: comp.emacs
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!news.aero.org!speedy.aero.org!bigsky.Aero.ORG!will
  3. From: will@bigsky.Aero.ORG (Willis Elias)
  4. Subject: Setting default TAB width?
  5. Message-ID: <1992Dec15.225753.20549@speedy.aero.org>
  6. Sender: news@speedy.aero.org
  7. Nntp-Posting-Host: bigsky.aero.org
  8. Organization: The Aerospace Corporation; El Segundo, CA
  9. Date: Tue, 15 Dec 1992 22:57:53 GMT
  10. Lines: 42
  11.  
  12. I'm an emacs novice and have a pretty simple question. I'm using GNU
  13. emacs (version?) on a Sun SparcStation. I'd like to know how I can set
  14. the TAB character "width" to 4 spaces. I believe it defaults to 8
  15. spaces when in text-mode. Although Lisp is totally foreign to me, I
  16. have hacked-around in my .emacs file and tried the following:
  17.  
  18.     (setq c-tab-always-indent nil)
  19.     (setq tab-width 4)
  20.  
  21. This first attempt doesn't seem to do anything. So I tried the
  22. following: 
  23.  
  24.     (global-set-key "    " (quote tab-to-tab-stop))
  25.     (edit-tab-stops)
  26.  
  27. This does the job, but in a really lame way: If I invoke emacs from an
  28. X-Window without any file name argument, emacs starts up with the
  29. edit-tab-stops buffer. I can then manually modify the tab stops, do a
  30. C-c C-c to save the new tab stops, and start grabbing files and
  31. editting away with the new tab stops in effect. If I invoke emacs from
  32. an X-Window _with_ a file name argument, emacs loads the named file
  33. into the current buffer on "top" of the edit-tab-stops buffer. So I
  34. could change buffers to the tab stops buffer, modify tab stops, switch
  35. buffers, edit file, etc...
  36. This *works* but there must be a better, more automated way (something
  37. like the first attempt maybe?). 
  38.  
  39. Any suggestions would be appreciated.
  40. ==============================================================================
  41. Willis Elias                |The Aerospace Corporation, El Segundo, CA
  42. 310-336-8653                |
  43.                             |"BACK OFF MAN!!                   
  44. will@bigsky.aero.org        | DON'T MAKE ME USE THIS!!" -Ren Hoek
  45. ==============================================================================
  46. Fortune:
  47. --------
  48. A countryman between two lawyers is like a fish between two cats.
  49.         -- Ben Franklin
  50. ---------------------------------------------------------------------
  51. Disclaimer: The previous fortune was generated randomly and, as such,
  52. does not in any way reflect the social, political or religious views
  53. of the sender.
  54.